Information Technology Reference
In-Depth Information
$ git checkout -b foo-bar-tmp
and apply the patches in it:
$ git am *.patch
The patches are not needed anymore, thus you can remove them with:
$ rm *.patch
Then you rename temporary branch foo-bar-tmp the original name foo-bar with:
$ git branch -M foo-bar-tmp foo-bar
When the branch foo-bar is ready you go to the master branch:
$ git checkout master
And merge the foo-bar branch again:
$ git merge --no-ff -m "2nd merge of 'foo-bar'" foo-bar
Summary
Two previous chapters presented merging and rebasing—two operations that complic-
ate the structure of the graph of revisions. Here in chapter 8 we focused on the revision
graph even more, considering diverse methods to transform its structure. I'm quite sure
that you will find many of the recipes discussed here useful in your daily work.
All recipes presented here underline the nature of revisions. Let me remind you once
again: revisions do not change. Once created, they cannot be modified. All you can do
is to create new revisions that will—in some respects—resemble originals. This rule
forms the basis for various undo operations. If you ever want to undo something in git
you have to look for a revision pointed by HEAD before you start the operation. If you
know its name, then $ git reset --hard [REVISION] will undo the opera-
tion.
The second important thing to remember from this chapter concerns the three areas
of the repository:
Search WWH ::




Custom Search