I need to pull changes from origin. Problem is that one of libs was updated to newest version and it crashes my part of application. I would like to pull recent changes and then go back to previous (or specific) version for only one folder, which contains that problem causing lib. Is there any way to do that?
git checkout LAST_WORKING_COMMIT -- vendor/library/in/question
This will check out the folder in the version of LAST_WORKING_COMMIT
. However, git status
will then tell, that the files are modified:
$ git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: vendor/library/in/question/file.exe
#
no changes added to commit (use "git add" and/or "git commit -a")
Use an additional argument to git checkout
:
git checkout REV -- folder
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With