Information Technology Reference
In-Depth Information
In the case of merges, the reflog entry HEAD@{1} right after the $ git merge com-
mand points to your current branch as it was just before the merge. Passing this as a
parameter to $ git reset --hard you will undo the merge. Even if your reflog
is empty, you can still undo the merge using the SHA-1 name, as in $ git reset -
-hard 757d501 .
6-4. Developing in parallel diverged
branches
Problem
You have just created a branch that contains a new feature of your application. The re-
pository looks like the one shown in Figure 6-2 . This is a starting point for Recipe 6-4.
You are not sure that your work on the feature branch is finished, however. You are
not sure that it is ready for a merge. Meanwhile, you want to continue your work in the
master branch. You want to switch to the master branch and create some new revi-
sions. The repository after this recipe should look like Figure 6-5 .
Figure 6-5 . The repository obtained after Recipe 6-4
Solution
 
 
Search WWH ::




Custom Search