mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	
		
			
				
	
	
	
		
			1021 B
		
	
	
	
	
	
	
	
			
		
		
	
	
			1021 B
		
	
	
	
	
	
	
	
Git Cheat Sheet
See also fixing commits
Commands:
- add
git add foo.py
 - checkout
git checkout -b new-branch-namegit checkout mastergit checkout old-branch-name
 - commit
git commit --amend
 - config
git config --global core.editor nanogit config --global core.symlinks true
 - diff
git diffgit diff --cachedgit diff HEAD~2..
 - fetch
git fetch origingit fetch upstream
 - grep
git grep update_unread_counts -- '*.js'
 - log
git log
 - pull
- do not use for Zulip
 
 - push
git push origin +branch-name
 - rebase
git rebase -i HEAD~3git rebase -i mastergit rebase upstream/master
 - reflog
git reflog | head -10
 - remote
git remote -v
 - reset
git reset HEAD~2
 - rm
git rm oops.txt
 - show
git show HEADgit show HEAD~~~git show master
 - status
git status