Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Git aliases to hide/unhide files #466

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions modules/git/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions modules/git/alias.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#
# Authors:
# Sorin Ionescu <[email protected]>
# Joel Kuzmarski <[email protected]>
#

#
Expand Down Expand Up @@ -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)
Expand All @@ -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}'
Expand Down