Re: git refuses to switch to older branches

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

 



Martin Waitz wrote:

> now that gitweb.cgi is autogenerated, git refuses to switch to old
> branches unless force is applied:
> 
>       fatal: Untracked working tree file 'gitweb/gitweb.cgi' would
>       be overwritten by merge.
> 
> This safety measure is quite useful normally, but for files that are
> explicitly marked as to-be-ignored it should not be neccessary.
> 
> But all the code that handles .gitignore is only used by ls-files now.
> Does it make sense to add exclude handling to unpack-trees.c, too?

I think it is "better to be annoying but safe" idea of git. You can always
do "git checkout <branch> gitweb/gitweb.cgi" and "git checkout <branch>",
and not use -f.

Or add gitweb.cgi to .gitignore in the old branch.

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


-
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]