gitignore - How can I tell git to ignore LibreOffice lock files? -
i have git repo contains xslx files. edit them libreoffice every once in while. libreoffice won't remove lock files ( ./folder/.~lock.filename.xslx#). causes files liested new on every git status.
i git ignore them. tried following in .gitignore doesn't seem work:
*.~lock* .~lock* */.~lock* any ideas?
update
also tried:
.~lock.*# as seen in http://lists.freedesktop.org/archives/libreoffice-commits/2012-december/040253.html no success.
to test patterns .gitignore,
git ls-files-ix '.~lock*'
to see if cached aka staged aka tracked aka added files match ignore patterns (and may have been added in error),
git ls-files -ic --exclude-standard
as @nevikrehnel pointed out, git won't ignore tracked files. un-track file,
git rm --cachedpath/to/it
which take out of next commit, way take file out of earlier history rewrite e.g. git commit --amend if last commit, git rebase -i if you've got few or git filter-branch bulk work. none of alters old history, add new history , switch current branch refer it. old history still there, , no other refs moved.
Comments
Post a Comment