I've cloned a repository "Rep" and created my own local branch "Li". I've committed a file called "task.js" to the local "Li" branch and pushed it to the remote "Li" branch. Now I want to revert this action by:
I tried to read several "pull" tutorials but can't figure out a way to do this (maybe because I don't really understand the basics yet...)
Thanks, Li
git reset HEAD~ will revert the laster commit of the current branch, but since you have already pushed the branch Li to public, it is better to do a git checkout master task.js and commit again in your branch Li.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With