Git - Create a new remote branch out of an old commit
git checkout -b new_branch_name
git reset --hard <old_commit_id>
git push origin new_branch_name
if you want create a new branch from a specific commit, execute command git log
or gitk
, copy the id and execute command git checkout ID COMMIT
, then commit and push. This link can help you.
There is a one-liner:
git push origin <id-of-commit>:refs/heads/<name-of-remote-branch>