Ubuntu: Ubuntu creating unwanted README.MD~



Question:

I have a folder containing a repository I am working on. In my repo, I have a file called README.md, as most repos do.

However, randomly, Ubuntu creates a file called README.md~, which gets pushed up to my repository on github in my next push. Then in my public repo I have two README files, which is slightly confusing and strange.

Why is this happening and how do I stop this?


Solution:1

The *~ files are backup files of your editor.

Open or create an ignore file .gitignore in the root of your project folder and add the line *~ which means: Ignore all files which filename ends with a ~

echo "*~" >> .gitignore  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »