On Tue, 22 Jun 2010, Curtis Olson wrote:

> Here's a dumb git question.
>
> Previously with cvs or svn, if I inadvertently removed a file, or screwed up
> a file really badly and just wanted to start clean with the repository
> version, I could just remove the file and run "cvs/svn update" and the
> missing file would be noticed, and the system would pull the correct version
> back from the repository.
>
> Is there an equivalent or similar way to do this in git?  "git pull" says
> "already up to date".  "git update" says 'update' is not a git command.
>
> Thanks,

Hi,

Try

git checkout -- file

And in case you want to undo local commits or rearrange them:
http://www-cs-students.stanford.edu/~blynn/gitmagic/ch05.html

(But be careful not to do too creative things with commits you have pushed 
to the public repository)

Cheers,

Anders
-- 
---------------------------------------------------------------------------
Anders Gidenstam
WWW: http://www.gidenstam.org/FlightGear/

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to