From Fedora Project Wiki
m (Initialize a repo) |
(adding a document draft so it gets found better and has more love) |
||
Line 1: | Line 1: | ||
[[Category:Draft Documentation]] | |||
{{admon/warning|Quick Reference Only|This is not intended to be an exhaustive list of git operations. See the [http://git.or.cz/#documentation documentation] for that.}} | {{admon/warning|Quick Reference Only|This is not intended to be an exhaustive list of git operations. See the [http://git.or.cz/#documentation documentation] for that.}} | ||
== Basic Operations == | == Basic Operations == |
Revision as of 03:49, 15 October 2008
Basic Operations
Initialize a new repo
mkdir repo && cd repo && git init
Developer Operations
Create a new local branch
git checkout -b <branch>
Push and create a new remote branch from an existing local branch of the same name
git push origin <branch>
Switch to a branch that was pushed remotely
Use:
git branch -a
to determine the name of the remote branch you want to work on. Remote branches will be preceded by origin/
. Then use this to switch to it:
git checkout -b <branch> origin/<branch>
Maintainer Operations
Apply mailed git patch
git am <file>