Sunday, August 9, 2020

How to rollback code on GitHub using Git ?

Use below commands in Visual Studio Code terminal

git reset --hard <commit id>
    Example - git reset --hard 123456aee40c705a5cf5e434

Push code to Github
    git push -f origin <branch name>

Example - 
     git push -f origin feature-deployment
     git push -f origin master