Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Automatic Commit for uncommitted code

Based on this question


Would it be worth it to have such functionality to prevent missing codes?



Mikael Sandberg Community Leader Feb 14, 2019

The thing about uncommitted changes is that it is only your local copy of the repository that knows about it. And Git does not keep track of how has create a clone of a repository. So in order to be able to bring in uncommitted changes from another clone you would need to change the default behavior of Git so it store information on where each clone is. I believe that is what Linus and the gang wanted to get away from when they came up with Git.

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

Mikael Sandberg Community Leader Feb 15, 2019

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.

Mikael Sandberg Community Leader Feb 15, 2019

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

Mikael Sandberg Community Leader Feb 15, 2019

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

Mikael Sandberg Community Leader Feb 15, 2019

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. 


Log in or Sign up to comment

Atlassian Community Events