Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- * Git Cheatsheet
- git stash --keep-index
- git clean -d -n
- git commit --amend (amend last commit)
- git reflog (a history of the commits HEAD has been pointed at; undo pulls, rebases etc)
- git add -u (update index, removes and modifies index entries but adds no new files)
- git add -i (interactive)
- git add -p (patch - interactively choose hunks of patch)
- git reset --soft (pointer)
- --mixed (pointer,index)
- --hard (pointer,index,working)
- git log -Ssome_string (where no. occurences of string has changed)
- git log --decorate
- git log --all (all sibling branches)
- git log --oneline
- git log --graph
- git diff br1:file1 br2:file2
- git remote show origin (show remote branches)
- git push -u origin branch_name (push local branch and set up tracking)
- git push origin --delete branch (delete remote branches)
- git rev-list --all | xargs git grep <regexp> (search for commit content)
- git config --global alias.tree "log --graph --decorate --pretty=oneline --abbrev-commit"
Add Comment
Please, Sign In to add comment