-
-
Notifications
You must be signed in to change notification settings - Fork 116
Expand file tree
/
Copy pathgit-unskip
More file actions
executable file
·33 lines (30 loc) · 696 Bytes
/
git-unskip
File metadata and controls
executable file
·33 lines (30 loc) · 696 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
set -e
usage () {
echo "usage: git unskip [-ah] <file> [<file> ...]" >&2
echo >&2
echo "Stop skipping local changes to files known to git." >&2
echo "This resets the result of git-skip to normal again." >&2
echo >&2
echo "Options:" >&2
echo "-a Unskip all files" >&2
echo "-h Show this help" >&2
}
all=0
while getopts ah flag; do
case "$flag" in
a) all=1;;
h) usage; exit 2;;
esac
done
shift $(($OPTIND - 1))
if [ $all -eq 1 ]; then
git update-index --no-skip-worktree $(git show-skipped)
else
if [ $# -gt 0 ]; then
git update-index --no-skip-worktree "$@"
else
usage
exit 2
fi
fi