Michael
Michael

Reputation: 16132

Global gitignore of files with tilde "~" (at the end of file name)

My operating system is: Linux Fedora 19

On Linux when I edit a file, some text editors create a backup of that file. And git sees that backup file as a new file: my_file.txt~

How can I make a global gitignore of files with tilde ~ (at the end of file name) without creating the .gitignore file?

Upvotes: 3

Views: 4136

Answers (1)

goji
goji

Reputation: 7092

You can configure a global gitignore file which will affect all of your local repos:

git config --global core.excludesfile ~/.gitignore_global

Then treat it just as the usual per repo .gitignore file.

See https://help.github.com/articles/ignoring-files for more options.

Upvotes: 4

Related Questions