How to set GIT (master or branch) to a previous commit version
First you need to switch to the desired location master or branch
- git checkout master or branch_name
Then
- git push -f origin commit_id:mast
er (For master) - git push -f origin commit_id:branch_name ( For branch)
Then you also need to cancel your local commit
- git reset --hard commit_id (from the desired location)
Comments
Post a Comment