Last active
December 24, 2015 22:59
-
-
Save gszauer/6876215 to your computer and use it in GitHub Desktop.
Git commands
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
Create new local branch | |
git branch <branch-name> | |
Switch local branch | |
git checkout <bran-chname> | |
Push changes | |
git push <remote-name> <local-branch-name>:<remote-branch-name> | |
Marge latest | |
git pull <remote-name> <branch-name> | |
Pull latest | |
Git pull | |
Go back one comit | |
git reset --hard HEAD~1 | |
Diff | |
git difftool HEAD~1 <file-name> | |
List local branches | |
git branch | |
-r remote | |
-a all (local & remote) | |
Remove remote branch | |
git push origin --delete <branchName> | |
Remove local branch | |
git branch -d the_local_branch | |
Clone repository | |
git-clone <repo-name> | |
Add all new files | |
git add -A | |
Revert changes to modified files. | |
git reset --hard | |
Remove all untracked files and directories. | |
git clean -fd | |
Undo add (before commit) without changing the file | |
git reset HEAD <file> | |
Remove file that was added (untrack) before commit | |
git rm --cached <added_file_to_undo> | |
Find SHA1 of branch | |
git reflog | |
Recover deleted branch | |
git branch <branchName> <sha1> | |
Rename Local Branch | |
git branch -m oldname newname | |
Deleting last commit remote: | |
http://christoph.ruegg.name/blog/git-howto-revert-a-commit-already-pushed-to-a-remote-reposit.html | |
Sources: | |
Reset: http://stackoverflow.com/questions/927358/how-to-undo-the-last-git-commit | |
Diff branches: http://stackoverflow.com/questions/822811/showing-which-files-have-changed-between-git-branches | |
Recover deleted branch: http://stackoverflow.com/questions/4025916/git-undo-local-branch-delete | |
Undo add: http://stackoverflow.com/questions/348170/undo-git-add-before-commit | |
== ADB | |
adb logcat -s Unity |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment