Git

From ArchWiki
Revision as of 12:25, 22 May 2007 by Iphitus (Talk | contribs) (New page: ===Git Cheatsheet=== Parts from everywhere, much from the wonderful tutorial here: http://www.kernel.org/pub/software/scm/git/docs/tutorial.html Pull the network scripts with git clone ...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Git Cheatsheet

Parts from everywhere, much from the wonderful tutorial here: http://www.kernel.org/pub/software/scm/git/docs/tutorial.html

Pull the network scripts with

git clone http://archlinux.org/~james/projects/network.git

Update an existing clone

git pull origin

Commit changes

git commit -a -m "changelog message"

To create a new branch

git branch somebranch

Change to a different branch

git checkout differentbranch

Merge a branch to current active branch

git merge somebranch

Delete a branch

git branch -d somebranch

Diff between two branches

git diff master..somebranch

Diff between two commit ID's (found in git log)

git diff e9780c7cba2855350e914fde227a79bb63c1351d..8b014e40346b38b3b9bfc41359b4e8a68e804c0d

Diff between the last two commits

git diff HEAD^ HEAD

Patchset between two branches (follows same syntax as git diff afaik)

git format-patch master..somebranch

Or better: http://wiki.winehq.org/GitWine#head-f7a29e7ed999b5924748a60c5a1cd4a019032d26

git format-patch -o out origin

Start remote repository http://www.adeal.eu/starting-with-git.php