Per-worktree local exclusion

余生颓废 提交于 2019-12-04 10:03:48

but it doesn't take

From this thread, it should, but if you are working with Visual Studio, it does not. Make sure to try with the latest 2.16.x version of Git to see if the issue persists.

Note that I do not see an info/exclude in .git/worktrees official layout documentation.

A workaround would to have a branch-specific .gitignore content.
That means adding your untracked file to the worktree .gitignore remains the best option.
And you can ignore modification on that (tracked) .gitignore file with the update-index command seen here.

git update-index --assume-unchanged -- .gitignore

That allows you for the local exclusion you are after.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!