1

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.

1

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
*~
INSTALL
Makefile
Makefile.in

/aclocal.m4
/autom4te.cache
/ChangeLog
/config.guess
/config.log
/config.status
/config.sub
/configure
/install-sh
/intltool-extract.in
/intltool-merge.in
/intltool-update.in
/missing

/tools/yelp-build
/tools/yelp-check
/tools/yelp-new
/xslt/mal-ncx.xsl
/xslt/mal-opf.xsl

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.