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.
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.