Option to disable auto-save

I use git to clone local copies of a test and live version of my app and then manage the deployment of change from one repo to the other.

However, the auto-save commits make that task somewhat more complicated as the branches on the two repos diverge every time the app is opened. Those commits mostly have no content at all, but the merges become trickier to manage and the history is virtually unreadable.

Could we have the option to disable the auto-save so that the commit history is entirely under our own control? (With all the ‘at your own risk’ disclaimers and not as the default for a new app).

2 Likes

As an alternative, you could add the file to .gitignore, and then only use Git for a local copy you make elsewhere.

Sorry, I don’t follow. What file might I add and how might that stop the creation of ‘Saved automatically’ commits?

Where is the file you want to ignore?

Here is a sample of ignoring a file previously committed via Git:

$ echo debug.log >> .gitignore
$ git rm --cached debug.log rm ‘debug.log’
$ git commit -m “Start ignoring debug.log”

I get how to add a file to .gitignore. What I don’t get is how that might assist in what I’d like to achieve.

My problem is that the automatically saved commits are empty. There is no file that I can add to .gitignore to stop that from happening.

My guess is that the ‘–allow-empty’ flag is being used. One solution might be to have the option to disable that flag, perhaps.

FYI, an “empty auto-save commit” is a bug - it shouldn’t happen if you don’t modify anything. We’re looking into it!

(I haven’t moved this thread to “Bug Reports” yet, but perhaps I should…)

1 Like

Even if “empty auto-save commit” don’t exist anymore, I second Owen’s request.

Very often I add a button and a little function just to see what’s the effect, then I delete it in the next few minutes. At the end of the day I end up with a plethora of useless “Saved automatically” commits in the repository.

I would like to be able to commit only explicitly.

4 Likes

Perhaps you should :smile:

Most of my changes are done offline with PyCharm, then pushed to the app. The git log shows that most commits are called “Saved automatically”, and most of them are empty.

@shaun I’m still seeing these empty commits. Has this one gone anywhere?

Hi @owen.campbell, you should no longer be seeing any empty commits. Let me know if you do and I can look into it for you :slight_smile:

3 Likes