From 2eef103c81de616f6529d13846731119ec73afc5 Mon Sep 17 00:00:00 2001 From: Enis Ozgen Date: Wed, 30 Oct 2019 19:46:30 +0100 Subject: [PATCH] Update-git-cheats --- cheats/git.cheat | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/cheats/git.cheat b/cheats/git.cheat index 3708cc0..17d7325 100644 --- a/cheats/git.cheat +++ b/cheats/git.cheat @@ -30,14 +30,14 @@ git checkout # Displays the current status of a git repository git status -# Displays the changes made to a file -git diff +# Displays unstaged changes for file +git diff / -# Stages a changed file for commit -git add +# Stages a changed file +git add / -# Stages all changed files for commit -git add . +# Stages all changed files +git add -A # Saves the changes to a file in a commit git commit -m @@ -95,3 +95,5 @@ git submodule foreach git pull origin master git submodule update --init --recursive $ branch: git branch | awk '{print $NF}' +$ toplevel_directory: git rev-parse --show-toplevel +$ unstaged_files: git --no-pager diff --name-only