Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How often should I commit

Hi all,

I'm new to Sourcetree, but I've been using SVN for sometime now. My question is, how often should I commit? What is the recommended way? In SVN, I would create a branch, check it out, work on changes that would sometimes take days, then check in. Most of the time, I would have multiple changes\files with my check in. I'm currently watching a Pluralsight video by Xavier Morera, who suggests to commit often. How often would that be? Not sure if committing every small change is a good idea.

Thanks in advance.

3 answers

I don't believe there is a definitive answer to that.

It comes down to how the repository is being used.

If it is just you working on it, then commit when you need to.

If there are other people using the same code, then the more often you commit, the easier it is for them to pick up on changes.

You can work the same way as you used to, check out a branch and make any changes, knowing that the master will contain the original code - and then merge or delete, depending on whether you need the changes.

0 votes

Hi Joe,

My advice is to trust your gut but aim for safety. If you get the basics working, that's a great time to commit before refactoring for final form. If you have a portion you'd like to snapshot (like, I got the UI done) that's another fine commit milestone. I like to do stages (got X part done, got Y part done, got X+Y wired up, add Z, etc.) and then wrap up in that merge commit which makes it all clean 😃HTH

Cheers,

Brian Ganninger
Senior Mac Developer, Sourcetree

Thanks for your replies.

Committing often, perhaps also helps with documenting your changes... by adding meaningful comments when committing of course. For my documentation, when checking in in SVN, I would go file by file to review what I'd changed and based on that, I would create my documentation. Our plan for now is that one developer will be working on a feature branch at a time.

 

Thanks again.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

3,261 views 4 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you