-
Sometimes in one of my branches/bookmarks I'll add an entry to the .gitignore file, and create some files (cached content or test logs or whatever) that is covered under that entry. When I switch to another revision without those changes, all those git-ignored files get added to the revision I switched to. e.g.
Here the I'm curious how people tend to deal with this. Are there any best practices here to avoid accidentally committing files on one bookmark that are actually just temporary files from another branch's work that should be ignored? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
One strategy is to only put repo files in the repo. That could mean using your build process to ensure that you get a clean copy to work on in your development folder. Or it could mean that you always direct your output outside the repo. Or it could mean you make a scratch folder and ignore it early on. |
Beta Was this translation helpful? Give feedback.
-
Yes, this is kind of painful right now and we don't have a good automatic solution. One possibility is to write ignore patterns that changed into |
Beta Was this translation helpful? Give feedback.
Yes, this is kind of painful right now and we don't have a good automatic solution.
One possibility is to write ignore patterns that changed into
.git/info/exclude
. That file is not modified by git.