I am not sure if this is ubuntu specific as I just switched from windows. Please let me know if I should ask this elsewhere.

I am using version control for some local repositories. Some of the files have a ~ at the end and I don't need these files. For example, I have test.m and test.m~ simultaneously. Other text files have the same issue too.

I want to include ALL files that end with ~ in .gitignore but I am unsure how to proceed.


a line with *~ in your .gitignore file should do it. Here is an example from the default .gitignore file for my yelp-tools git clone:

$ cat /home/doug/temp-yelp-git/yelp-tools/.gitignore



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.