i've accidentally committed files shouldn't tracked , should generated each developer on own. i've added pattern .gitignore them, that's late of course because files in repo. i've checked answers these questions, same thing:
- how make git "forget" file tracked in .gitignore?
- how stop tracking , ignore changes file in git?
- remove folder git tracking
the command:
git rm --cached <file>
doesn't work because if commit that, other developers have versions of file deleted once pull.
git update-index --assume-unchanged <file>
..doesn't work either because files still being tracked, if makes changes, committed unless each developer runs command. either way, keeps files in repository, don't want.
is there way make if files never in repository in first place? want same behavior git rm --cached <file>
without caveat of causing files deleted on pull..
"is there way make if files never in repository in first place?" "i wouldn't use [a rebase] since it's same problem of requiring other developers take action"
then there no solution. that's nature of git, committed , pushed mistakes forever. feature, not bug.
this pretty common scenario , answer might helpful others
reading the documentation better.
Comments
Post a Comment