0

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?

sabgenton
  • 1,823
  • 1
  • 12
  • 20

1 Answers1

1

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.

hobbs
  • 223,387
  • 19
  • 210
  • 288
  • OK I'll take your word for it :D If you've just checked out an orphan branch it doesn't work (until you do a commit there) but other than that it's always worked :) – sabgenton Nov 28 '13 at 10:49