Remove Syncthing Conflicts

As I have started using the desktop in my house, as well as my laptop, I have also started using Syncthing to keep some of my various projects, org-files and Emacs setup [see below] the same across my devices. As such, Syncthing conflicts have become the bane of my existence, so I had to work out someway to deal with them.

After much browsing, I found a handy Python script on GitHub by sercxanto for identifying all conflict files. Useful, but all it did was identify them. So I dusted off my keyboard, and made a quick Bash script to take the output from this, but also give the option to delete all located files. It’s quick and dirty, but it does the job great for me, and I’m sure others could find use for it. The only minimal “feature” it has is automatically downloading the syncthing_findconflicts.py if it is not already present on the users system.

You can see RemoveSyncthingConflicts.sh on my Notabug page, feel free to do whatever you want with it, as per the licence.

I’ve had a few ideas to extend it – namely picking which folders have their conflicts removed, or stepping through each found conflict 1 by 1 asking for deletion confirmation. I haven’t implemented these yet, because I am learning a bit of Python so I may just fork the original work by sercxanto and put them in there.

Either way, it does what I need for now, and I have a project to tinker with when I have some time. It might also work for you, so check it out if you use Syncthing on Linux!

[Note] – I’m new to Emacs, and that really deserves a post all of it’s own, if I ever stop tweaking my config for long enough to take the time! Org-mode alone makes it worth learning, but if you do anything with creating text – be it creative writing or coding – you owe it to yourself to use Emacs if you are of the technically minded set.

The image for this post was based on “File:Generic Fighting Video Game (with outline).svg” by Ftiercel is licensed under CC BY 3.0

Author: Category

Find me on Mastodon @category@mastodon.technology

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s