Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

commit to wrong branch git | move wrong commit to the correct branch


#source
#https://jasonmccreary.me/articles/made-git-commit-wrong-branch/


git reset HEAD~ --soft

git stash

git checkout destination-branch

git stash pop

git add .

git commit -m $MESSAGE
Source by ohshitgit.com #
 
PREVIOUS NEXT
Tagged: #commit #wrong #branch #git #move #wrong #commit #correct #branch
ADD COMMENT
Topic
Name
2+8 =