[Beta] Do not AutoCommit changes

As was in the old editor, the new Editor constantly saves the changes from your files as you edit then (which is good and needed).

It also auto-commits those changes every (if I’m not mistaken) 15 minutes. This was ok in the old editor, but with the Version Control introduced in the Beta editor, we should be able to completely control our commits, so things like:

Should look just like:

image

What I think it should do is always save the editing of the workfiles but don’t commit or always commit amending the prior commit and when the dev clicks in commit, then it reopens that last commit so we can commit always using a useful commit message. I always review every change in every file before commit in my work and personal projects and would like to do that here too, now that we have an almost full VCS implemented.

Of course, this should be configurable, since for new users or users not as familiar with git the current workflow is perfect.

5 Likes

Or maybe an option to hide those auto-commits?

No, just hidding will actually serve me nothing.

When I commit my changes I want to see and review all changes since the last commit. If there was other commits in between that are hidden I would not have “approved” them. What I want is all changes to be in a single commit, when I think is time to commit them according to changes I’m doing.

The way is right now I need to review the current changes, but also every single auto-commit in between the last manual commit, which is a lot of work to review changes that are not even valid anymore.

1 Like

Yep. My current workflow is to create a ‘dirty’ branch in the ide, work on it and, when I’m happy, fetch it locally to sort out the mess it’s made of my commit history, merge it to ‘clean’ branch, push that back to anvil, reset the ‘dirty’ branch and go again.

2 Likes

Exactly. I also use branchs for every different workflow, but doing this workaround is not optimal.
I wanted to show a clean history for all branches.

1 Like

I agree with the request.

The very fact of fetching it locally as @owen.campbell suggests, does cause that fetched branch to remain there forever.

I often fetch to do the actual editing (not just the final review), especially when I work on some complex logic with tons of classes that have nothing to do with UI. I fetch, work on my classes in PyCharm, run tests, then push. Then I notice that something needs to be tweaked and I start with some back and forth between PyCharm and the IDE, which causes the repository to have even more than one ugly commit every 15 minutes.

I, like Owen, am at peace with the proliferation of useless commits in the development branch, and try to keep the published branches clean.

But, unlike Owen, I work offline only on the development branch, then I merge development to production in the IDE. So I don’t get the occasional merge commit because I have inadvertently modified something online before pushing my commit from PyCharm.

1 Like

I tend to get rid of the branches. I end up with an ‘orphaned’ series of dirty commits but I don’t really mind that.

You mean you fetch, then work on another branch locally, then push, then delete the branch that you previously fetched so that commit is orphaned?

No, that’s too much work for me!

Then “I am at peace with the proliferation of useless commits in the development branch”, but more than Owen!

I’m just happy to have a clean production branch.

1 Like

I am too and the VCS view implemented in the Beta editor made me mega happy, but we could do more with probably just a few tweaks in some settings.

If it’s possible, I want every branch to be as clean as it can be, with only a few merge commits with default message, that I don’t mind.

I think the “Edited … files” was awesome for the old editor ( way better than “Saved automatically” used before) but now I think we need a little more hehehe.

1 Like

Just to clarify the current behavior, the IDE (beta and classic) only auto-commits if you haven’t made any edits for 15 minutes straight: https://anvil.works/docs/version-control-new-ide#automatic-commits

So you can code for an hour and not get an auto-commit as long as you don’t stop making edits in the IDE for more than 15 minutes. (Still, I’d like to be able to take a break without making a commit.)

3 Likes

5 posts were split to a new topic: [Beta] Incorrectly amending commits

I would also like to “turn off” the IDE creating commits for me every 15 minutes. Saving is still required for sure, but if that can be decoupled from commits, I’d want that.

2 Likes

Another one asking this:

2 Likes