Git ignore a file without cluttering the shared .gitignore
I'd made myself a helper script that, being specific to my workstation and my workflow, I didn't want to commit to the repo. Nor did I want to add that little oddball to the .gitignore
file that's part of the repo. But it kept showing up as an untracked file that I had to remember not to commit.
Git offers a local-only list of files to exclude. In the folder containing your git repository, open the .git
folder, then the info
folder, and edit the exclude
file. Add your item to be ignored, using the same syntax that .gitignore
uses.
Written by Sharon Cichelli
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#