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 Tue, Mar 03, 2009 at 01:51:14PM -0800, dealmaker <vinkhc@xxxxxxxxx> wrote:
>   I am going to upgrade software to a newer version in my main trunk, I
> decide to download the newer version and checkout the main trunk and  copy
> it over to my main trunk.

Do you mean the 'master' branch by 'main trunk'? Trunk is not in Git's
terminology.

> If the older version has some files that are no
> longer in the newer version, how does git determine whether to keep those
> files or not?  Does it even notify me that those files are no longer needed?

First, I think storing upstream code (that you will never touch) in
version control is a horrible idea, but if you really do it, I would do
something like:

cd /path/to/copy
rm -rf *
cp -a /path/to/new/version/* .
git add -A
git commit -m 'update foo to 2.0'

That will add/update/delete files as you would expect.

Attachment: pgp7ut2cUXnWc.pgp
Description: PGP signature


[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