This commit is contained in:
William Hilton 2015-08-06 23:47:29 -04:00
parent fba79b8894
commit 04d090fee9

34
bin/get
View file

@ -10,8 +10,17 @@ list_remote_branches() {
}
case "$1" in
"")
echo 'TODO: Display help, or git status if inside a repo'
"" | status)
# TODO: Display help if not inside a repo
# TODO: figure out how to git config --global color.status always automatically.
git status \
| grep -v 'On branch' \
| grep -v '(use "git push" to publish your local commits)' \
| grep -v '(use "git reset HEAD <file>..." to unstage)' \
| grep -v '(use "git add <file>..." to update what will be committed)' \
| grep -v '(use "git checkout -- <file>..." to discard changes in working directory)' \
| grep -v '(use "git add <file>..." to include in what will be committed)' \
| grep -v 'nothing added to commit but untracked files present (use "git add" to track)'
;;
stage)
@ -34,6 +43,15 @@ else
fi
;;
add)
# TODO: make add only add untracked files (useful when auto-completing)
;;
rm)
echo Removing
git rm "$2"
;;
reset)
echo Resetting
if [ -z "$2" ]; then
@ -114,18 +132,6 @@ ignore)
;;
status)
# TODO: figure out how to git config --global color.status always automatically.
git status \
| grep -v 'On branch' \
| grep -v '(use "git push" to publish your local commits)' \
| grep -v '(use "git reset HEAD <file>..." to unstage)' \
| grep -v '(use "git add <file>..." to update what will be committed)' \
| grep -v '(use "git checkout -- <file>..." to discard changes in working directory)' \
| grep -v '(use "git add <file>..." to include in what will be committed)' \
| grep -v 'nothing added to commit but untracked files present (use "git add" to track)'
;;
diff)
if [ -z "$2" ]; then
echo 'Compare working tree with HEAD'