While working on a project that does a lot of symlinking by default, the need to keep symlinks out of the Git repository became evident. Fortunately, it’s not too hard. The solution came from this post’s answers. Thanks guys! The Command Just run the following command from the base directory of your Git repository, and it will automagically add all the symlinked files to the base .gitignore file. for f in $(git status --porcelain | grep '^??' | sed 's/^??