7
Ederbit
6y

Questions/best practises for git?

For example:
- use present tense in commit messages. (why though?)

A friend of mine also starts his commit messages with either [Task] or [Cleanup]. Useful for finding Commits in Gitlab etc, because only the first line is shown from the message.

Also, one teacher recommended the usage of branches and the other didn't because of alot of potential merge conflicts when working in a Team or a larger Collaboration. What are your thoughts?

Sorry for the messy post, have a hangover

Comments
  • 4
    We use branch names in your commits at work so you can track any like of code in master back to a JIRA story/bug.

    Edit: forgot to mention that we name branches after JIRA identifiers.
    Like:
    ANDROID-576_player

    And the commit would be:
    "ANDROID-567: Fixed player"
  • 3
    Definitely use branches. You'll have a lot more conflicts without than with., And you'll always have a clean master.

    Git commit title: use imperative mood.
  • 2
    I tried using gitmoji (https://gitmoji.carloscuesta.me/) for a while to kinda-sorta tag my commits for a while...it didn't stick with my coworkers and I found that it cut down on my potential effective commit message length
  • 2
    I always use branches when working with a group. Then before doing a pull request into master Ill merge master into my development branch, resolve any conflicts, then be able to have a clean pull request.
Add Comment