From c7f5215dfbe0c37662ea82fb2f817740a0bf3afc Mon Sep 17 00:00:00 2001 From: iamsudip Date: Thu, 24 Oct 2013 09:31:42 +0530 Subject: [PATCH] Added cheats --- cheatsheets/git | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cheatsheets/git b/cheatsheets/git index 45c6057..9688ae6 100644 --- a/cheatsheets/git +++ b/cheatsheets/git @@ -14,6 +14,9 @@ git add --all # To commit staged changes git commit -m "Your commit message" +# To edit previous commit message +git commit --amend + # To push to the tracked master branch: git push origin master @@ -32,5 +35,6 @@ git checkout master # Checkout local master git checkout -b new_branch # Create and checkout a new branch git merge upstream/master # Merge remote into local repo git show 83fb499 # Show what a commit did. +git diff branch_1 branch_2 # Check difference between branches git log # Show all the commits git status # Show the changes from last commit