feat: add 'g fff'
This commit is contained in:
parent
8d9d0bfd42
commit
231010fa79
2 changed files with 12 additions and 0 deletions
11
bin/g
11
bin/g
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue