Re: How does Git know which files no longer needed during upgrade?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 04, 2009 at 12:28:07PM +0000, Stefan Näwe wrote:

> > > cd /path/to/copy
> > > rm -rf *
> > > cp -a /path/to/new/version/* .
> > > git add -A
> > > git commit -m 'update foo to 2.0'
> > 
> > Nit: "rm -rf *" will miss files starting with '.'. So it is probably
> > simpler to say what you mean: delete all files managed by git:
> > 
> >   git ls-files -z | xargs -0 rm -f
> 
> But maybe one wants to keep a .gitignore file. 

True. The problem is that you have no way of saying "give me all the
files that git cares about, except the ones that I put there manually
and not from this tarball." If you guess that dot-files are manual and
everything else isn't, then that is easy, but not necessarily right.

If you tagged the last import, you use "git ls-tree" to get you the list
of files just from the tarball.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux