Skip to content

Commit

Permalink
Add Git aliases for update-index & --skip-worktree
Browse files Browse the repository at this point in the history
  • Loading branch information
Pinjasaur committed Aug 15, 2019
1 parent 19242a8 commit a6792d1
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,23 @@
# Unstage from the the staging area
unstage = reset HEAD

# Mark a file as "assume unchanged"
# Git `update-index` shorthand
ui = update-index

# Mark a file as "assume unchanged": good for perf
assume = update-index --assume-unchanged
# Reverse the above
unassume = update-index --no-assume-unchanged
# Show the files that are currently assume-unchanged
assumed = !git ls-files -v | grep ^h | cut -c 3-

# Mark a file as "skip worktree": good for config files
skip = update-index --skip-worktree
# Reverse the above
unskip = update-index --no-skip-worktree
# Show the files that are currently skip-worktree'd
skipped = !git ls-files -v | grep ^S | cut -c 3-

# Create an annotated tag with a message for a (sem)ver release
ver = "!f() { git tag -a ${1} -m \"${1}\"; }; f"

Expand All @@ -64,7 +74,7 @@

# Show verbose output about tags, branches or remotes
tags = tag -l
branches = branch -a # -v for verbose
branches = branch -a
remotes = remote -v

[color]
Expand Down

0 comments on commit a6792d1

Please sign in to comment.