From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: Re: git refuses to switch to older branches
Date: Sun, 20 Aug 2006 00:48:56 +0200 [thread overview]
Message-ID: <ec84gg$p2l$1@sea.gmane.org> (raw)
In-Reply-To: 7v3bbs1h8c.fsf@assigned-by-dhcp.cox.net
Junio C Hamano wrote:
> Jakub Narebski <jnareb@gmail.com> writes:
>
>> 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.
>
> I think you are talking backwards. Newer branch have .cgi
> generated and older branch has it tracked. After you have built
> in a newer branch, checking out an older branch without -f
> option would play it safe not to clobber .cgi which is
> annoying. So workaround you would want to suggest is TO USE -f.
If I remember correctly that is what I did when "master" (and I had switch
to master to do "git pull origin") didn't contain gitweb.cgi -> gitweb.perl
rename. My proposed solution first overwrites generated gitweb.cgi by
tracked file (i'm not sure if this is feature or bug that git-checkout
with file specified (path limit specified?) doesn't need -f, and then
you can do git-checkout full branch without -f.
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
next prev parent reply other threads:[~2006-08-19 22:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-19 20:25 git refuses to switch to older branches Martin Waitz
2006-08-19 21:47 ` Jakub Narebski
2006-08-19 22:41 ` Junio C Hamano
2006-08-19 22:48 ` Jakub Narebski [this message]
2006-08-20 1:34 ` Junio C Hamano
2006-08-19 22:39 ` Junio C Hamano
2006-08-19 22:44 ` Petr Baudis
2006-08-20 12:21 ` Martin Waitz
2006-08-20 12:48 ` Johannes Schindelin
2006-08-20 18:15 ` Martin Waitz
2006-08-20 18:46 ` Johannes Schindelin
2006-08-20 19:11 ` Josef Weidendorfer
2006-08-20 7:26 ` Alex Riesen
2006-08-20 12:19 ` Martin Waitz
2006-09-08 22:00 ` Alex Riesen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='ec84gg$p2l$1@sea.gmane.org' \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).