Home > Blockchain >  Problems with Git interactive rebase
Problems with Git interactive rebase

Time:02-05

Any time I try to to do any kind of interactive rebase, even if its just to reword a commit message, the program cannot manually delete the temporary folders and files it created during the rebase process, so I have to delete them manually.

Thing is, more than once, problems arrived from that, and if I hadn't made a back up of the branch, I'd have been in deep trouble. This happens with all programs. It happens when I use VSCode terminal, when I use just the bash, when I set the text editor to be regular Notepad, with Notepad , etc.

Anyone knows why this is happening?

CodePudding user response:

Your problem is that you have a repository in a cloud syncing service. That can cause lots of problems.

One of them is that you can end up with a corrupted repository. That's because cloud syncing service back up and restore files individually and not necessarily in the order that Git creates them. Git writes and deletes files in a specific order to preserve the integrity of the repository and if they end up partially written on the other side, that usually results in a corrupt repo. Similarly, these tools can change or restore what a branch points to, resulting in corrupt data.

The other is that on Windows, you typically cannot delete a file that's in use. These tools open files to sync them, which means that they can't be deleted, and then you end up with breakage. This is really just another variant of corrupt repositories.

In general, you should not store a repository on a cloud syncing service unless you want corruption or other problems. If the repository is totally quiescent (no processes running in it at all), you can create a tarball, and sync that in a cloud syncing service. Note, however, that sharing a working tree between systems effectively allows anyone with access to any of those systems to execute arbitrary code on the other, so you should not share such a tarball across untrusted machines or users.

  • Related