deed02392
deed02392

Reputation: 5022

~ appended to a collection of file names in git repository?

I have a fairly small git repository of under 1,000 files. Ever since a merge was performed I had a bunch of .orig files generated, which I read is just the diff tool providing a backup (the merge seemed to be successful). However there are other files with ~ added right to the end of the file. Why might these have appeared, ie are they safe to delete?

Upvotes: 0

Views: 51

Answers (2)

deed02392
deed02392

Reputation: 5022

I used this to remove all the files after it was advised they were probably temporary copies created by my editor.

git status -su | grep -e"~$" | cut -f2 -d" " | xargs rm

Upvotes: 0

Lily Hahn
Lily Hahn

Reputation: 256

They're probably safe to delete - they're most likely backup files created by your text editor. However, why don't you just add it to your .gitignore? You can use *~.

Upvotes: 4

Related Questions