Skip to content

Commit 34db21e

Browse files
committed
Checkout existing branch w/ gmc
1 parent 0c9b2fc commit 34db21e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

functions/gmc.fish

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ function gmc --description "Move git commit to another branch"
2222
if test (count $argv) -ge 2
2323
echo "Error: Branch '$new_branch' already exists and base branch was specified"
2424
return 1
25+
else
26+
git checkout $new_branch
2527
end
2628
else
2729
# Create new branch from base_branch

0 commit comments

Comments
 (0)