tags:

views:

53

answers:

1

Hi guys,

unfortunately i deleted a src folder from my local master branch. Now i would like to pull or clone JUST the src file again from the origin. Is it possible to do that? When yes, how can i solve this issue...

Any suggestion is welcome...

Thanks in advance

+6  A: 

This should do it:

git checkout src
Siddhartha Reddy
Or `git checkout master -- src/` (or just `git checkout .` to restore everything in current (sub)directory)
Jakub Narębski
Hey Thanks, Your recommendation doesn't work. Since the src folder in the master branch does not exist longer. Any other ideas?
Ja
That shouldn't matter. What error do you get?
Siddhartha Reddy
Ja, do you mean to say that you deleted the directory (probably using *git rm*) and then committed it? In that case, the simplest solution is to find the particular commit (using *git log*) and then do *git revert <commit-id>*.
Siddhartha Reddy