mirror of
https://github.com/denisidoro/navi
synced 2024-11-22 03:23:05 +00:00
Update-git-cheats
This commit is contained in:
parent
840b96f62d
commit
2eef103c81
1 changed files with 8 additions and 6 deletions
|
@ -30,14 +30,14 @@ git checkout <branch>
|
|||
# Displays the current status of a git repository
|
||||
git status
|
||||
|
||||
# Displays the changes made to a file
|
||||
git diff <filename>
|
||||
# Displays unstaged changes for file
|
||||
git diff <toplevel_directory>/<unstaged_files>
|
||||
|
||||
# Stages a changed file for commit
|
||||
git add <filename>
|
||||
# Stages a changed file
|
||||
git add <toplevel_directory>/<unstaged_files>
|
||||
|
||||
# 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 <message>
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue