Created
April 26, 2009 11:40
-
-
Save dreamcat4/102012 to your computer and use it in GitHub Desktop.
Comand line reference
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GIT | |
# create a new branch named <new_branch> and start it at origin/master | |
git-checkout -b <new_branch> origin/master | |
# continue on an existing branch | |
git-checkout origin/master | |
# Split a hunk for staging | |
git add --patch | |
# move the HEAD of master branch back previous 2 commits | |
git-rebase -i master --onto master~2 | |
# Fix previous commits | |
http://www.gitready.com/advanced/2009/01/12/fixing-broken-commit-messages.html | |
# launch man page, equivalent to 'man-git-cmd' | |
git cmd --help | |
# fetch remote branch | |
git fetch origin gh-pages | |
# delete a remote branch or tag (push "" to ":" branch "dev") | |
git push origin :dev | |
# from local branch copy files into current work area | |
git checkout origin/gh-pages -- file1 file2 file3 | |
# branches as separate folders | |
git clone . /some/new/directory | |
# on-disk merge local repositories | |
git pull /the/other/clone | |
# GITX | |
# only show commits relating to 'Documentation' subdirectory | |
gitx -- Documentation | |
# only show commits that contain the word 'haha' | |
gitx -Shaha | |
# list all commits since version 0.2.1. | |
gitx v0.2.1.. | |
# GITNEST | |
gitnest add -p [email protected]:dreamcat4/geokit-rails.git | |
gitnest update | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment