Let's say we made a commit
and that a file was changed wrong. Is there any way to revert this commit
to just the file you want?
Let's say we made a commit
and that a file was changed wrong. Is there any way to revert this commit
to just the file you want?
Yes, there are 2 ways to do this:
1- Specifying the file commit revision number:
git checkout revisao nomedoarquivo
2- Specifying the number of revisions you want to roll back (the number of revisions rolled back after ~):
git checkout master~1 nomedoarquivo
For more information, look at the reference .