Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does *~ do in a .gitignore file?

Tags:

I just ran across a gitignore file that ends with the line *~ but I have not been able to find a description of what this does.

like image 906
Alex Avatar asked Feb 24 '15 23:02

Alex


1 Answers

It ignores all files whose name ends in ~, which is a usual suffix for text editors backup files.

* is a special symbol and means "any sequence of zero or more characters", while ~ is just an ordinary character. Putting the two parts together: "zero or more characters followed by a ~".

like image 165
Stefano Sanfilippo Avatar answered Sep 28 '22 01:09

Stefano Sanfilippo