How often do you guys commmit / push ? I push in my changes when I have completely finished working on a feature / module
Ask HN: How often do you commit / push in Git?
1–10 of 36 posts
Re: Ask HN: How often do you commit / push in Git?
#2If you just updated a typo in some comments, it could make sense to commit it and it could take 30 seconds.
Now if you are always committing as frequently, either you are working on very easy tasks with no dependencies, either there is an issue.
Re: Ask HN: How often do you commit / push in Git?
#3Committing every 30 seconds seems like it would knock me out of my flow so often that I wouldn't get anything done.
That being said, if I'm working in the same files as someone else, I'll commit every few minutes (and so will they) so that the amount of conflicts we're creating don't get out of hand.
Re: Ask HN: How often do you commit / push in Git?
#4Re: Ask HN: How often do you commit / push in Git?
#5Re: Ask HN: How often do you commit / push in Git?
#6I push whenever I'm about to shutdown the laptop or by the end of they day.
Re: Ask HN: How often do you commit / push in Git?
#7I tend to push at the first opportunity it makes sense for other people to see my code, and then push again whenever I make enough incremental progress towards the feature to share. Our team has a culture of opening "in progress" PRs early and often to get feedback before we are too far along. This is great to share ideas and feedback about how things should work (instead of just about how they do based on implementation). It also helps keep the final code review size / time down.
Re: Ask HN: How often do you commit / push in Git?
#8Using this model I do work in progress commits as needed for different features using many different branches. Those wips and committed locally and are pushed to the remote fork many times per day for backup. For example I can do a quick push before going to lunch or meeting. I can also fetch, rebase, squash, and force push commits as desired because the only history I am affecting is on my own fork. The final merge to the "main" repository is usually 1-2 commits squashed from all the wip commits. Once that is merged I, since I am usually working on a feature branch, I can delete that branch locally and in the remote fork.
Every 30 seconds seems like a bit much, but it wouldn't be unreasonable to say I commit and push 10x a day.
Re: Ask HN: How often do you commit / push in Git?
#9I use Scrum and I usually commit about once an hour. More if I'm just bug-fixing or correcting typos or adding comments. Committing every 30 seconds seems like it would knock me out of my flow so often that I wouldn't get anything done. That being said, if I'm working in the same files as someone else, I'll commit every few minutes (and so will they) so that the amount of conflicts we're creating don't get out of han…
Re: Ask HN: How often do you commit / push in Git?
#10I use Scrum and I usually commit about once an hour. More if I'm just bug-fixing or correcting typos or adding comments. Committing every 30 seconds seems like it would knock me out of my flow so often that I wouldn't get anything done. That being said, if I'm working in the same files as someone else, I'll commit every few minutes (and so will they) so that the amount of conflicts we're creating don't get out of han…
Curious, if Scrum makes you get into this mindset that you have to commit every hour ?