Git local commit?

How does the built in GIT work? It seems it doesn’t do local commits, but just pushes straight to the remote repo?
Or is there a way to make a local commit without pulling and pushing?

I think a “local commit” is just saving… Or is there something I am missing?

Use a git client and do ”git commit”.

2 Likes

yes, of course, just wondering if there was a feature to commit in the editor that I had missed

A git repo exists both on a server and as a local copy. Commits are version controlled check ins to the local copy. Then you push those commits to the server. That’s one way Git is different from say SVN.

The built in git functionality is not meant to solve all use cases but provide a simple baseline that should work for most small team cases. If you need more control an external git client works fine. The current implementation is perhaps not optimal (we have a few issues regarding the git workflow in the backlog) but attempts to expose what’s going on while keeping the UI fairly simple with few steps:

  1. “Pull” which pulls the server tree and merges it.
  2. “Push” which allows you to stage changed files. Continue the “push” to do a local commit (there is no way git can push files that has not been committed first) and then the editor pushes the local tree to the server.

It’s explained here: https://www.defold.com/manuals/workflow/

2 Likes

OK, thanks! That sounds reasonable for small or one man teams, since the local commit and branching is not that for that use case.

3 Likes