git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Newbie "svn update" question
@ 2009-12-01  9:25 Mikko Oksalahti
  2009-12-01  9:45 ` Howard Miller
  2009-12-01  9:49 ` Newbie "svn update" question Tay Ray Chuan
  0 siblings, 2 replies; 4+ messages in thread
From: Mikko Oksalahti @ 2009-12-01  9:25 UTC (permalink / raw)
  To: git

Hi,

I just started using git for my personal projects at home. Basic usage seems 
pretty straight-forward as well as setting up everything. However, I have a 
simple question about how do I mimic an "svn update" command on a locally 
created repository. Here's what I do:

some_existing_project_dir> git init
some_existing_project_dir> git add .

(about 1000 files added...)

some_existing_project_dir> git commit -a -m "initial commit"

(now I edit 10 files and accidentally delete some files that I'm not aware of)

How do I now get the accidentally deleted files back from the repository without 
losing local changes made to 10 files? 

I've tried using: "git checkout HEAD ." but my local changes after last commit 
will be lost.

I've tried using: "git pull ." but the deleted files are not restored.

So I'm looking for an "svn update" equivalent command that would semantically do 
this: "Get the latest version of all files from the repository and merge them 
with any local changes I've made to files."

I know a suitable command is available and I'm just a moron who can't read the 
manual correctly but help me out anyway :P

  Regards,
     Mikko

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-12-01 12:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-01  9:25 Newbie "svn update" question Mikko Oksalahti
2009-12-01  9:45 ` Howard Miller
2009-12-01 12:00   ` Newbie Mikko Oksalahti
2009-12-01  9:49 ` Newbie "svn update" question Tay Ray Chuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).