"The current branch is reset to " does not mean that becomes the current branch but that the current branch ( local/dev) is moved to the commit identified by. The current branch on that point is not necessarily dev (it is, in fact, local/dev as explained above). You interpret the documentation incorrectly. , on the other hand, needs to be a branch because, as a result of the rebase, it will move to a different commit. Any reference that identifies a commit (branch, tag, commit, HEAD, HEAD^2, etc) can be used as. ![]() ![]() The current branch during the rebase is local/dev it is the only branch that is affected by the rebase. This means that: git rebase dev local/dev In plain English, if git rebase is invoked with two branches ( and ), it first switches to the second branch then rebase it on top of the first branch. Otherwise it remains on the current branch. If is specified, git rebase will perform an automatic git switch before doing anything else. It explains in the first paragraph: git rebase Read the documentation of git rebase carefully. Why dev pointer is not moved to top with HEAD? - because it is not the current branch during the rebase. When dev and local/dev differ liner and could be fas forwarded, then my dev is moved on top as I am expected to work. Should I apply some option to move my current dev on top with HEAD? Why dev pointer is not moved to top with HEAD? ![]() The commits are then reapplied to the current branch **This is the commits marked as > on second picture Successfully rebased and updated detached HEAD.Ĭommits are rebased but dev pointer is not updated:Īll changes made by commits in the current branch but that are not in I am currently on dev branch and have some changes on local/dev branch.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |