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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -