Git revert file
Use case:
We have commit which broke the build
We suspect that problem appears after edits to csproj files
Task: revert changes to csproj but leave all other changes in place
How:
Take commit hash - 9657173f8
List of files that we need to rolback - Rabota4.DAC/Rabota2.DAC.csproj ... RabotaUA/RabotaUA.csproj
Command:
git checkout 9657173f8~1 -- file1.csproj file2.csprojNote: ~1 - is kind of delta to previous graph state
Link to original - Reset or revert a specific file to a specific revision using Git?