Difference between revisions of "Git/branch"
< Git
Jump to navigation
Jump to search
(definition) |
(commands) |
||
Line 1: | Line 1: | ||
[[category:git/concepts]] | [[category:git/concepts]] | ||
+ | [[category:git/commands]] | ||
A "branch" is a separate copy (of the files involved in a project) which can be worked on without affecting the original copy. | A "branch" is a separate copy (of the files involved in a project) which can be worked on without affecting the original copy. | ||
"Branching" is a concept basic to most [[version control system]]s. | "Branching" is a concept basic to most [[version control system]]s. | ||
+ | ==Commands== | ||
+ | To find out what branches are available: | ||
+ | * <code>git branch</code> lists local branches | ||
+ | * <code>git branch -r</code> lists the remote branches | ||
+ | * <code>git branch -a</code> lists both local and remote branches | ||
==Links== | ==Links== | ||
===Reference=== | ===Reference=== | ||
* [http://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell 3.1 Git Branching - Branches in a Nutshell] | * [http://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell 3.1 Git Branching - Branches in a Nutshell] |
Revision as of 17:59, 9 March 2015
A "branch" is a separate copy (of the files involved in a project) which can be worked on without affecting the original copy.
"Branching" is a concept basic to most version control systems.
Commands
To find out what branches are available:
git branch
lists local branchesgit branch -r
lists the remote branchesgit branch -a
lists both local and remote branches