Menu

Showing posts with label reset a file changes in git. Show all posts
Showing posts with label reset a file changes in git. Show all posts

git command to discard/reset a file changes

When we make some change in an existing file, but that change doesnt go for commit, in this situation we have to reset the file with the last commit or undo the file changes. For undo and reset a file in git use this got command.

git command to reset a file: git checkout <file path /filename>