Created
December 21, 2012 21:56
-
-
Save maartenl/4356118 to your computer and use it in GitHub Desktop.
Git
This file contains 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
Repository is at: | |
git@github.com:maartenl/testing.git | |
git+ssh://git@github.com/maartenl/testing.git | |
Export svn to git: | |
/var/lib/gems/1.8/bin/svn2git | |
svn+ssh://maartenl@www.karchan.org/home/maartenl/subversion --nobranches | |
--exclude build --exclude build.xml --exclude dist --exclude gclient | |
----exclude nbproject --exclude src --exclude test --exclude web | |
Help | |
git help --web <command> | |
Creating a new repo: | |
git init | |
git add existing files | |
git commit -a -m 'initial project version' | |
Checking out the respository: | |
git clone git+ssh://git@github.com/maartenl/testing.git | |
git clone git+ssh://git@github.com/maartenl/Land-of-Karchan.git | |
git clone git+ssh://git@github.com/maartenl/YourPersonalPhotographOrganiser.git | |
git clone git+ssh://git@github.com/maartenl/maartenl.github.com.git | |
Files: | |
git add file | |
git rm file | |
git mv file | |
Committing the current version: | |
git commit -a | |
Changing comments in the last commit: | |
git commit --amend | |
Updating the current versions from the remote repository: | |
git pull | |
Sending committed changes in the current version to the remote repository: | |
git push | |
Checking differences: | |
git diff | |
reverting (all committed) changes | |
git reset --hard HEAD | |
reverting a single (committed) change | |
git reset HEAD <filename> | |
reverting changes | |
git checkout HEAD hello.rb | |
Checking the log: | |
git log [file(s)] | |
Branching | |
git branch patch-xx w4s8nobbwnrsztnl6szv4nyzw4iuzwr | |
git checkout master | |
git checkout patch-01 | |
git push origin patch-01 | |
from branch master: git merge patch-01, then resolve conflicts and commit | |
See http://stackoverflow.com/questions/948354/git-push-current-branch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment