minor update to git-prompt
This commit is contained in:
Regular → Executable
+11
-6
@@ -1,12 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# the command used to initialize our partial subtree
|
||||
#git remote add -f -t master --no-tags gitprompt https://github.com/git/git.git
|
||||
#git read-tree --prefix=git-prompt/ -u gitprompt/master:contrib/completion
|
||||
#git commit
|
||||
# check if we have added the git remote already
|
||||
hasRemote=$(git remote -vv | grep 'gitprompt' || echo 'nope')
|
||||
|
||||
# the command used to update our partial subtree
|
||||
git rm -rf git-prompt
|
||||
if [[ "$hasRemote" == "nope" ]]; then
|
||||
# add the remote so we can do a partial subtree
|
||||
git remote add -f -t master --no-tags gitprompt https://github.com/git/git.git
|
||||
else
|
||||
# clear out existing git-prompt folder, so we can rebuild it
|
||||
git rm -rf git-prompt
|
||||
fi
|
||||
|
||||
# update our partial subtree
|
||||
git read-tree --prefix=git-prompt/ -u gitprompt/master:contrib/completion
|
||||
git commit
|
||||
|
||||
|
||||
Reference in New Issue
Block a user