git log --oneline // you see commits, find commit hash to which you want resetgit diff y0urhash src/main/.../../YourFile.java // to see differencegit reset y0urhash src/main/.../../YourFile.java // revert to y0urhash commitgit status // check files to commitgit commit -m "your commit message"git push origin