Everytime I edit something in Scratch, it creates a file with the same name ending with a tilde (~).
How can I prevent this? This is really annoying while working with Git.
elementary OS Stack Exchange is a question and answer site for developers and users of elementary OS and applications. It only takes a minute to sign up.
Sign up to join this communityAlthough not a direct resolution to your problem, you should probably add tilde files to your .gitignore file anyways. This will prevent git from even noticing them, and should solve your problem.
You can read about the format and contents of the .gitignore file here.
Best of luck!
This is because you have the file open and are currently editing it. Once you close Scratch this should disappear.
You won't see the tilde file if you disable "show hidden files" in Files or disable "save files when changed" in Scratch.