Changes

Jump to: navigation, search

Git Cheatsheet and Gotchas

96 bytes added, 14:14, 9 January 2013
Getting Started
<pre>git clone existingRepo newRepo</pre>
In these cases, newRepo is the name of the new local repository to create and existingRepo is the name of the repository to copy files from- this can be a local directory name or a URL.
== Modifying and Committing ==
== Branching ==
A branch represents a divergence in codepaths and is implemented as a pointer to a commit. Branches are desirable whenever a change in the code is to be made that may affect the stability of the rest of the code base (bug fixes, new features, new versions). Though all work is done on a branch: even your start branch! Your start branch is known as '''trunk''' or the '''working copy''' or '''master''', and may be branched off of whenever desired (using the branch command). After making a branch, you will not be automatically switched to it and modifications won't be applied. You can switch branches using the checkout command) A branch can be made and used in a few ways:
<pre>git branch newBranch

Navigation menu