branch - Git saying there are changes to my .gitignore but "git status" shows "nothing to commit" -
currently working on branch off master, , added .gitignore. committed changes , tried checking out branch get:
error: local changes following files overwritten checkout: .gitignore please, commit changes or stash them before can switch branches. aborting when run git status, get:
on branch feature/blahblah nothing commit, working directory clean does mean git not tracking .gitignore file? if so, how recognize file?
did you, chance, add .gitignore line .gitignore file, it's ignoring itself? if so, remove it; it's best not ignore .gitignore file. other places besides .gitignore might responsible global core.excludesfile setting, or .git/info/excludes file in repository (which not checked in). neither of these practice in general, specific cases might require them (e.g., 1 developer uses different editor other people on project needs different set of ignored files), options available. see https://help.github.com/articles/ignoring-files/ more details.
that seems problem.
Comments
Post a Comment