diff options
author | Mattias Andrée <maandree@operamail.com> | 2013-08-16 01:27:09 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2013-08-16 01:27:09 +0200 |
commit | cab322c3c83177f19a55dd5b957a3b972369d65e (patch) | |
tree | b4c9fe6131fb824ec46a3ac129819aa03d6a2a87 | |
parent | typo (diff) | |
download | using-git-cab322c3c83177f19a55dd5b957a3b972369d65e.tar.gz using-git-cab322c3c83177f19a55dd5b957a3b972369d65e.tar.bz2 using-git-cab322c3c83177f19a55dd5b957a3b972369d65e.tar.xz |
creating branches
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r-- | using-git.texinfo | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/using-git.texinfo b/using-git.texinfo index e958384..2a952e8 100644 --- a/using-git.texinfo +++ b/using-git.texinfo @@ -324,6 +324,7 @@ to the blessed repository. @menu * Workflow:: +* Creating branches:: @end menu @@ -351,6 +352,45 @@ experiments. +@node Creating branches +@section Creating branches + +The quickest way to create a new branch and +start working on it is to issue a checkout +command that create a new branch: + +@example +git checkout -b BRANCH_NAME +@end example + +After issuing this command you are located +in a new branch. The create it in the origin, +make a push: + +@example +git push -u origin BRANCH_NAME +@end example + +From this point on you can push without +parameters: + +@example +git push +@end example + +The @command{-u origin BRANCH_NAME} is just +to initially tell which remote repository +a pushes should go to. + +To switch branch use the checkout command: + +@example +git checkout BRANCH_NAME +@end example + + + + @node GNU Free Documentation License @appendix GNU Free Documentation License @include fdl.texinfo |