feat: add 'g fff'

This commit is contained in:
William Hilton 2019-06-05 10:41:12 -04:00
parent 8d9d0bfd42
commit 231010fa79
2 changed files with 12 additions and 0 deletions

11
bin/g
View file

@ -316,6 +316,17 @@ ff)
git pull --ff-only
;;
fff)
# Get local branch name
local_branch=$(git rev-parse --abbrev-ref HEAD)
# Move HEAD pointer
git checkout HEAD~0 &>/dev/null
# Delete local branch
git branch -D "$local_branch" &>/dev/null
# Re-checkout the local branch
git checkout "$local_branch"
;;
ignore)
GIT_ROOT=$(git_root)
CWD=$(pwd)