Answers for "github create branch from previous commit"

CSS
0

make previous commit master

git checkout master
git reset --hard <old_commit_id>
Posted by: Guest on August-13-2020
0

checkout master with previous commit

git checkout 307a5cd        # check out the commit that you want to reset to 
git checkout -b fixy        # create a branch named fixy to do the work
git merge -s ours master    # merge master's history without changing any files
git checkout master         # switch back to master
git merge fixy              # and merge in the fixed branch
git push                    # done, no need to force push!
Posted by: Guest on July-16-2020

Code answers related to "github create branch from previous commit"

Browse Popular Code Answers by Language