How to revert a single committed file that has been pushed in GIT? -


i have done research online, , still not figure out best way revert 1 single file has been pushed repository using git.

i have done git revert, reverts entire commit. let's if have 2, 3 files in commit, want revert 1 file, wouldn't work well.

any ideas? many thanks

first, revert commit, not commit revert: git revert --no-commit <sha>. then, unstage files would reverted git reset. can add files want git add <file>. git commit, clean working directory match index git checkout ..


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -