Re: [PATCH] checkout -f: do not leave untracked working tree files.

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] checkout -f: do not leave untracked working tree files.

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:30

Alexander Litvinov [off-list ref] writes:
Good news. I have a habbit to switch branches using two commands:

git checkout -f second-branch
git clean -d -q

Now this will work with single command. Thanks.
"will" meaning "you suspect" or "you tried and confirmed"?

Re: [PATCH] checkout -f: do not leave untracked working tree files.

From: Alexander Litvinov <hidden>
Date: 2016-06-15 22:42:30

"will" meaning "you suspect" or "you tried and confirmed"?
:-) I suspect.

Lets test. Your pu branch (5af05efbeaa06005596129fb111a739a87f8a883) really 
works. I have cvs repo and use git for daily work. I have head and 2 branches 
from cvs and store CVS/* files in git too. Usualy this operation pruduce a 
lot of CVS/Tag files:

git checkout -f cvs-v52 (this is one of by cvs's branch)
cvs -q up -dP (nothing have been updated)
git checkout -f master (this is a dev branch from cvs head)
git status

pu branch nuke them when use git checkout -f !
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help