Some best practices for using Git
deepsource.io
Some best practices for using Git
1–10 of 13 posts
Re: Some best practices for using Git
#2Re: Some best practices for using Git
#3Re: Some best practices for using Git
#4Great pointers. However, I have found that even though quite a few people know this, it takes special effort to enforce it. For example, the single-purpose commits. My commits often tend to get a bit large, and include more than one "unit" of work, even though I know the best practices. Any pointers on how to avoid that?
Re: Some best practices for using Git
#5Great pointers. However, I have found that even though quite a few people know this, it takes special effort to enforce it. For example, the single-purpose commits. My commits often tend to get a bit large, and include more than one "unit" of work, even though I know the best practices. Any pointers on how to avoid that?
It's important to resist the urge to do push things only on perfection. It works for me.
Re: Some best practices for using Git
#6Squash all commits! No development commits in master branch.
Re: Some best practices for using Git
#7Great pointers. However, I have found that even though quite a few people know this, it takes special effort to enforce it. For example, the single-purpose commits. My commits often tend to get a bit large, and include more than one "unit" of work, even though I know the best practices. Any pointers on how to avoid that?
Re: Some best practices for using Git
#8Great pointers. However, I have found that even though quite a few people know this, it takes special effort to enforce it. For example, the single-purpose commits. My commits often tend to get a bit large, and include more than one "unit" of work, even though I know the best practices. Any pointers on how to avoid that?
I try to emphasize that commits should not be thought of as "save points," which seems to be a seductive way to think of them, but as "undo points."
Re: Some best practices for using Git
#9Great pointers. However, I have found that even though quite a few people know this, it takes special effort to enforce it. For example, the single-purpose commits. My commits often tend to get a bit large, and include more than one "unit" of work, even though I know the best practices. Any pointers on how to avoid that?
In particular, the ability to only stage specific "hunks" at a time (interactive "patch" in the nomenclature of git) can make it possible to "untangle" multiple changes in your working directory into separate commits.
Re: Some best practices for using Git
#10Every git commit should have a ticket ID. Squash all commits! No development commits in master branch.