From 04d090fee9aef6b69e8ea5a1ac5327ed2bc71a7c Mon Sep 17 00:00:00 2001 From: William Hilton Date: Thu, 6 Aug 2015 23:47:29 -0400 Subject: [PATCH] Added rm --- bin/get | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/bin/get b/bin/get index e27b191..a842b20 100755 --- a/bin/get +++ b/bin/get @@ -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 ..." to unstage)' \ +| grep -v '(use "git add ..." to update what will be committed)' \ +| grep -v '(use "git checkout -- ..." to discard changes in working directory)' \ +| grep -v '(use "git add ..." 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 ..." to unstage)' \ -| grep -v '(use "git add ..." to update what will be committed)' \ -| grep -v '(use "git checkout -- ..." to discard changes in working directory)' \ -| grep -v '(use "git add ..." 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'