javanoob
javanoob

Reputation: 6412

How to get rid of .BACKUP files which are messing up my Git merge process?

I am merging a remote branch into my local branch and I want to overwrite all the Local class names starting with `A' with their corresponding remote branch files.

so I am using the command:

git checkout origin/master src/classes/A*

I hope the above command is correct[Please correct me if otherwise].
When doing so I am getting the below errors:

enter image description here

To fix the above errors, I tried the git rm command:

git rm src/classes/AClassName.cls.BACKUP.4294.cls but it throws the below errors:

enter image description here

How do I get rid of these .BACKUP files?

NOTE: These BACKUP files were created because I was trying to resolve merge conflicts using meld tool and in the middle of the process I closed meld tool without saving the changes. This is what atleast I could remember how these files were generated.

Upvotes: 1

Views: 827

Answers (1)

CodeWizard
CodeWizard

Reputation: 142352

git clean

You can do a git clean to remove all the un-tracked files (Backup files)

git clean -Xfd // capital X
git clean -xfd // small x

This will remove all the untracked / ignored files and more.

Read more about this clean command

Remove the files from your file system

rm -R **.BACKUP

Upvotes: 2

Related Questions