Thread (7 messages) flat view 7 messages, 3 authors, 2016-06-15

Re: .gitignore vs untracked working file

From: Johannes Sixt <hidden>
Date: 2016-06-15 22:47:12

Rostislav Svoboda schrieb:
2009/8/10 Uwe Kleine-König [off-list ref]:
quoted
Hello,
quoted
$ git checkout master
error: Untracked working tree file 'Project/bin/path/file.jjt' would
be overwritten by merge.
What is the output of

       $ git ls-files master bin/
Nothing:
It should have been

	$ git ls-tree master bin
BTW the rule to ignore bin/ is exclusively in the .gitignore on the
branch mybranch not in the master branch. Might this be the problem?
It might be, depending on how precious Project/bin/path/file.jjt is for
you. Try this:

	$ git checkout -f master

This will overwrite the existing file with the version from master. If you
later

	$ git checkout mybranch

then the file will be *removed*.

-- Hannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help