1

How to 'git pull --rebase' for all Git branches?

I need to make git bundle frequently with latest source hence, I run git pull --rebase for each branch manually. When I run git pull --rebase --all I see for current active branch rebased is done but for other branch I see "head is some # commit ahead" this type of message. Is there any git tool running which will result like running git pull --rebase after switching each branch manually?

Sazzad Hissain Khan
  • 37,929
  • 33
  • 189
  • 256
  • 1
    As a general rule, the `--all` option is not useful. If you're a Git expert, `--all` can sometimes be useful—but not in this case. (There are different Git commands with different `--all` meanings, but for `git pull`, `--all` is passed to `git fetch`, and for `git fetch`, only Git experts can understand what `--all` means and it's not useful in your, or most other, cases.) – torek Jan 13 '21 at 18:27

1 Answers1

2

One, you would need to script that, as it is not supported by Git natively.

Two, as documented in "Modify base branch and rebase all children at once", you would need to deal with:

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250