Bugfix auto-stashing in 'get branch'
This commit is contained in:
parent
65a868210d
commit
afba5f9252
1 changed files with 2 additions and 2 deletions
4
bin/get
4
bin/get
|
|
@ -68,13 +68,13 @@ echo 'Switching to branch'
|
|||
if [ -z "$2" ]; then
|
||||
echo '! Specify branch name'
|
||||
else
|
||||
git stash # Save branch index state
|
||||
git stash save --include-untracked --quiet 'get-branch autostash' # Save branch index state
|
||||
if git rev-parse --verify --quiet "$2" > /dev/null; then
|
||||
git checkout "$2"
|
||||
else
|
||||
git checkout -b "$2"
|
||||
fi
|
||||
git stash pop # Restore branch index state
|
||||
git stash pop --quiet # Restore branch index state
|
||||
fi
|
||||
;;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue