git create branch with untracked files

Posted by Surya on Stack Overflow See other posts from Stack Overflow or by Surya
Published on 2010-04-19T13:29:39Z Indexed on 2010/04/19 13:33 UTC
Read the original article Hit count: 327

Filed under:
|

I've a master branch with a .gitignore file with directory X listed in it. (X is not being tracked).

When I try to add a branch tracking a remote using the command

git checkout -b mybranch origin/mybranch

The remote branch is tracking X directory, and hence this checkout fails with the error Untracked working tree file 'X' would be overwritten by merge.

what is the way out ?

Surya

© Stack Overflow or respective owner

Related posts about git

Related posts about remote-branch