diff --git a/modules/git/README.md b/modules/git/README.md index 0dd932f6..a15f8e3b 100644 --- a/modules/git/README.md +++ b/modules/git/README.md @@ -84,6 +84,7 @@ Aliases - `gdm` lists modified files. - `gdu` lists untracked files. - `gdk` lists killed files. + - `gdh` lists hidden files. - `gdi` lists ignored files. ### Fetch @@ -113,6 +114,8 @@ Aliases - `giR` resets the current index interactively. - `gix` removes files/directories from the index (recursively). - `giX` removes files/directories from the index (recursively and forced). + - `gih` hides files/directories from the index. + - `gis` shows files/directories hidden from the index. ### Log diff --git a/modules/git/alias.zsh b/modules/git/alias.zsh index bf6d3644..31133ca8 100644 --- a/modules/git/alias.zsh +++ b/modules/git/alias.zsh @@ -3,6 +3,7 @@ # # Authors: # Sorin Ionescu +# Joel Kuzmarski # # @@ -72,6 +73,7 @@ alias gdx='git ls-files --deleted' alias gdm='git ls-files --modified' alias gdu='git ls-files --other --exclude-standard' alias gdk='git ls-files --killed' +alias gdh='git ls-files -v | grep "^h " | cut -d" " -f2-' alias gdi='git status --porcelain --short --ignored | sed -n "s/^!! //p"' # Fetch (f) @@ -98,6 +100,8 @@ alias gir='git reset' alias giR='git reset --patch' alias gix='git rm -r --cached' alias giX='git rm -rf --cached' +alias gih='git update-index --assume-unchanged' +alias gis='git update-index --no-assume-unchanged' # Log (l) alias gl='git log --topo-order --pretty=format:${_git_log_medium_format}'