diff options
Diffstat (limited to 'using-git.texinfo')
-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 |