Sanman
Sanman

Reputation: 11

GIT reset for particular directory and its sub directories

I am new to GIT. I have done some changes in source files and committed. When I try to upload I am getting conflicts in log files. I need to reset the log files.

Is there any way that I can reset only log files?

eg:- I have /home/source and /home/logs, I need to reset only /home/logs

Upvotes: 1

Views: 419

Answers (1)

Tim Biegeleisen
Tim Biegeleisen

Reputation: 520888

Try this:

git checkout HEAD -- /home/logs

The checkout command replaces both the index and working version of files in /home/logs with the HEAD version of these files. I am assuming that you are using some flavor of Linux. I am also assuming that the most recent committed version of the logs files will be in sync with your remote when you go to push.

Upvotes: 1

Related Questions