sabgenton
sabgenton

Reputation: 1893

Is git rebase from current branch *exactly* the same as the explicit version from another branch?

I spose this is a basic question but in most posts I don't see people use rebase with an explicitly defined branch (to rebase) much so I'm just wondering if there's a reason?

git checkout feature
git rebase master

VS explicit:

git checkout random-possibly-orphand-branch
git rebase master feature

Is there any caveats to the latter? Does defining an explicit branch name care where HEAD is?

Upvotes: 0

Views: 47

Answers (1)

hobbs
hobbs

Reputation: 239871

I think it's just that rebase "feels" like an operation on HEAD. The docs say that if you specify a branch, rebase starts by doing a git checkout of that branch, so I believe the effect is absolutely identical.

Upvotes: 1

Related Questions