From cab322c3c83177f19a55dd5b957a3b972369d65e Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 16 Aug 2013 01:27:09 +0200 Subject: creating branches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- using-git.texinfo | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'using-git.texinfo') 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 -- cgit v1.2.3-70-g09d2