-
-
Save zeel-dev/5267672 to your computer and use it in GitHub Desktop.
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
| #add existing to git | |
| git init | |
| git add . | |
| git remote add origin git@github.com:USERNAME/REPONAME.git | |
| git push -u origin master | |
| #remove svn | |
| find . -name '.svn' -type d -print0 | xargs -0 rm -rf | |
| git commit -a -m 'removing svn files' | |
| #show user data | |
| git config -l | |
| #tag a release | |
| git tag -a v1.0 -m 'version 1.0' | |
| git push origin --tags | |
| #pull to a repo not in current directory | |
| git --git-dir=/path/to/repo/.git pull | |
| #like svn revert | |
| git reset --hard ;git pull | |
| #like svn revert but restores current changes | |
| git stash;git pull;git stash pop | |
| #commit/push with add | |
| git commit -a -m 'message';git push | |
| Test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment