makansij
makansij

Reputation: 9875

Difference between `git rebase foo bar` and `git checkout bar; git rebase foo`?

I've seen both, and they seem to do the same thing.

1) git rebase foo bar

2) git checkout bar; git rebase foo

Are they the same? And, does it depend on which branch you are on when you do 1)?

Upvotes: 2

Views: 93

Answers (1)

Thomas Stringer
Thomas Stringer

Reputation: 5862

Those are the same things. Take a look at the documentation on git-rebase:

If is specified, git rebase will perform an automatic git checkout before doing anything else. Otherwise it remains on the current branch.

Upvotes: 1

Related Questions