Based on this question
Pull-Uncommited-Changes-on-Remote-Machine
Would it be worth it to have such functionality to prevent missing codes?
But what about a setting to upload local uncommited changes to a remote branch. Idk like check points or something. This would be sourcetree only function
So you are looking for a function that automatically commits and push your code changes on a time interval? What would you do in a situation where incomplete changes are pushed out? I am not sure that such a function would be well received. I can only speak for the developers in my company and most of them would be against it. From time to time they add code just to test something out, but have no intention to have it added to the code base or make it available for others. So with an automatic sync that code would be pushed up and be available.
Lets say that you are not using Bitbucket or Github as a centralized storage, and/or you have multiple remotes, should the automatic sync push it to all those remotes? Or just a subset?
Basically a subset, a stash probably? See my the comment i posted, i thought i had replied, turns out i just posted a New comment
It would be automática but it would commit to a different branch Just to save the code.
We have had people leave the company that published a New versión of an application without committing changes.
It isnt until the next change that we realizen the code on the repo does not have the Last changes incorporated.
Say you have your local copy, instead of coommiting automatically to Its remote, it would commit the uncommitted changes to a different branch. But keeping track to Its remote, everything would be the same. We would Just give others access to see the code changes on my local copies.
So instead of the default Git behavior where there is a one-to-one relationship between your local branch and the remote (in most cases), you want a one-to-two relationship? Like if you are working on lets say my-branch and you push your changes to origin/my-branch, the auto-sync would also push your changes to origin/my-branch-auto?
The situation you described where a developer released a new version without committing his/her changes, I would say that is a broken development process. Why would a developer have direct access to push uncommitted code to a production environment, and without at least a code review?
It is indeed a broken process, but Its causing us rework. I would think we are not the only ones with the problem.
It would still be a 1 to 1 relationship, the automátic commit would go to a different untracked branch, Just for consultation.
I think im not quite explaining myself
I agree, you are not the only one with this problem, I have seen plenty of broken processes and developers that goes rogue to bypass a process.
I think I know what you are looking for, and it can be done, but I also believe it would just hide the real issue. We have a similar situation, where dev teams think that they can fix a broken process by "fixing" the tool instead.
This is actually my last Resort. Im totally against it as this is just discipline
I totally understand. The only immediate option I can think of would be either a backup solution on each client (that is what we tried when we first migrated to Git/Bitbucket, we later decided that developers have to push as part of their commit) or a scheduled job on each client that runs a script that checks the repository for uncommitted code and if it finds it, commits it and merge it to a untracked remote branch.