OT: git question -- fetch a deleted file?

Jeremy C. Reed reed at reedmedia.net
Thu Oct 5 10:49:55 PDT 2006


> On Thu, 2006-10-05 at 10:57 -0500, Jeremy C. Reed wrote:
> > I manually deleted some files in a sub directory in my xserver checkout.
> > 
> > I tried to do a "git pull" and a "git fetch" but the files never returned.
> > 
> > I am used to being able to do a "cvs up -dPA" and being able to retrieve 
> > files I removed.
> > 
> > Any suggestions on how to do this with git?
> > 
> > I looked at the git-pull and git-fetch manual pages.
> 
> The whole repository is local, no need to fetch anything remote for
> this...
> 
> git-checkout <files>

Thanks. That worked.

I used "git-reset HEAD" to tell me the filenames of which files were 
missing ("needs update"). I don't know if that is the correct way.

Is there a way to get it to replace my missing files without me doing each 
file at a time (like "cvs up")? (It doesn't seem like I should parse 
git-reset output to be reused by git-checkout for this.) I see 
git-checkout -f but I don't know if that will overwrite my changes. I just 
want to replace all my missing files.



More information about the xorg mailing list