diff --git a/modules/git/README.md b/modules/git/README.md index c2d0449c..d180ffca 100644 --- a/modules/git/README.md +++ b/modules/git/README.md @@ -36,14 +36,15 @@ Aliases ### Branch - `gb` lists, creates, renames, and deletes branches. + - `gba` lists all local and remote branches and their commits. - `gbc` creates a new branch. - - `gbl` lists branches and their commits. - - `gbL` lists local and remote branches and their commits. + - `gbd` deletes a branch. + - `gbD` deletes a branch irrespective of its merged status. - `gbs` lists branches and their commits with ancestry graphs. - `gbS` lists local and remote branches and their commits with ancestry graphs. - - `gbx` deletes a branch. - - `gbX` deletes a branch irrespective of its merged status. + - `gbv` lists branches with verbose information about their commits. + - `gbV` lists branches with more verbose information about their commits. - `gbm` renames a branch. - `gbM` renames a branch even if the new branch name already exists. @@ -53,6 +54,7 @@ Aliases - `gc` records changes to the repository. - `gca` stages all modified and deleted files. - `gcm` records changes to the repository with the given message. + - `gcam` stages all modified and deleted files, and records changes to the repository with the given message. - `gco` checks out a branch or paths to work tree. - `gcO` checks out hunks from the index or the tree interactively. - `gcf` amends the tip of the current branch using the same log message as @@ -109,6 +111,8 @@ Aliases - `giu` adds file contents to the index (updates only known files). - `gid` displays changes between the index and a named commit (diff). - `giD` displays changes between the index and a named commit (word diff). + - `gii` temporarily ignore differences in a given file. + - `giI` unignore differences in a given file. - `gir` resets the current HEAD to the specified state. - `giR` resets the current index interactively. - `gix` removes files/directories from the index (recursively). diff --git a/modules/git/alias.zsh b/modules/git/alias.zsh index ffa854dd..586a45f3 100644 --- a/modules/git/alias.zsh +++ b/modules/git/alias.zsh @@ -31,9 +31,10 @@ alias g='git' # Branch (b) alias gb='git branch' +alias gba='git branch -av' alias gbc='git checkout -b' -alias gbl='git branch -v' -alias gbL='git branch -av' +alias gbv='git branch -v' +alias gbV='git branch -vv' alias gbx='git branch -d' alias gbX='git branch -D' alias gbm='git branch -m' @@ -45,6 +46,7 @@ alias gbS='git show-branch -a' alias gc='git commit --verbose' alias gca='git commit --verbose --all' alias gcm='git commit --message' +alias gcam='git commit --all --message' alias gco='git checkout' alias gcO='git checkout --patch' alias gcf='git commit --amend --reuse-message HEAD' @@ -57,7 +59,7 @@ alias gcs='git show' alias gcl='git-commit-lost' # Conflict (C) -alias gCl='git status | sed -n "s/^.*both [a-z]*ed: *//p"' +alias gCl='git diff --name-only --diff-filter=U | cat' alias gCa='git add $(gCl)' alias gCe='git mergetool $(gCl)' alias gCo='git checkout --ours --' @@ -94,6 +96,8 @@ alias giA='git add --patch' alias giu='git add --update' alias gid='git diff --no-ext-diff --cached' alias giD='git diff --no-ext-diff --cached --word-diff' +alias gii='git update-index --assume-unchanged' +alias giI='git update-index --no-assume-unchanged' alias gir='git reset' alias giR='git reset --patch' alias gix='git rm -r --cached'