Differences between version 13 and predecessor to the previous major change of KernelDevelopmentWithGit.
Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 13 | Last edited on Friday, June 30, 2006 3:32:04 pm | by IanMcDonald | Revert |
Older page: | version 12 | Last edited on Sunday, June 25, 2006 11:36:50 am | by IanMcDonald | Revert |
@@ -94,6 +94,25 @@
</verbatim>
where COPY_HEAD is your copy of HEAD....
However check the contents of the HEAD file as sometimes it's just a reference such as <tt>ref: refs/head/master</tt> in which case make a copy of that file which is being pointed to.
+
+!Working with branches
+
+A key feature of git is to maintain branches of code. For example you might keep Linus' code and your own in separate branches.
+
+To create a branch do the following:
+<verbatim>
+git-branch mybranch
+</verbatim>
+
+Now switch to it like:
+<verbatim>
+git-checkout mybranch
+</verbatim>
+
+If you want to merge back with a branch (e.g. master which is Linus' branch)
+<verbatim>
+git-merge "A comment" mybranch master
+</verbatim>
----
Part of CategoryKernel