Git branch naming conventions

Discussion in 'iOS Programming' started by patent10021, Jul 30, 2018.

  1. patent10021, Jul 30, 2018
    Last edited: Jul 30, 2018

    patent10021 macrumors 68030

    patent10021

    Joined:
    Apr 23, 2004
    #1
    I know a lot of people use slashes aaa/bbb/ccc/, but slashes are not recommended especially if you use Github for directory reasons. Slashes seem to be a favourite of Atlassian users. Dashes and slashes aside, I've seen:

    username-featurename-develop
    featurename-develop
    feature-featurename-develop etc

    I am adding a new watchOS target to an iOS project so I'm trying to think of a good branch name for the first commit. Do you think creating a brand new watch app is a feature? Would it have its own master? i.e. watchapp-master.dev or simply be something like username-watch-dev?

    Do you think watchapp-dev is ok? Maybe username-watch-dev?
     
  2. PhoneyDeveloper macrumors 68040

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2
    If you're new at this you should probably stick to a master branch and feature branches. I've never heard of any problem with slashes in the branch names and I use them all the time. My naming convention is feature/feature-name. Some other people use camel case for feature-name. So feature/featureName or feature/FeatureName. In your case it could be feature/watchapp or feature/start-watch-app or something like that.

    I use a git workflow that's called oneflow and is described here

    http://endoflineblog.com/oneflow-a-git-branching-model-and-workflow

    There's another popular git workflow called git-flow that I recommend you don't use. It's unnecessarily complicated.
     
  3. patent10021 thread starter macrumors 68030

    patent10021

    Joined:
    Apr 23, 2004
    #3
    I've seen a couple of gitflow models. Good concepts. Just because you use slashes all the time doesn't mean potential issues won't arise. Many people are using slashes. Especially Atlassian users. It's specific to Github and directories and it's well documented. It may not be causing issues for you know, but can cause issues when things get complex. Just Google it. We just went with watchapp-master-dev. Easy and self explanatory.

    What do you use for issue tracking outside of Github? Slack Github integration? Jira?
     
  4. PhoneyDeveloper macrumors 68040

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #4
    OK, Mr Google tells me there's a problem with using two slashes in a branch name or having a two branches like 'foo' & 'foo/bar' I don't do either of those things. Just feature/feature-name release/1.0. Some people on my team use fix/bug-name. I'll never have a branch named 'feature' or 'release' or 'fix' and I never tried to have a branch with two slashes in the name.

    The project I'm on uses VSTS and it has its own bug-tracking system. Github issues should work for small projects. I haven't used Jira but people seem to like it. You can use Trello if it's suitable. Depends how complicated your needs.
     
  5. patent10021 thread starter macrumors 68030

    patent10021

    Joined:
    Apr 23, 2004
    #5
    Cool. This is a huge global project with tens of million users. iOS project is nearing 3GB. So I'm treading carefully and asking questions like nuts. I'm a junior dev and have been invited to explore the codebase and contribute. My pull requests will be mostly editing etc but I just want to make sure I don't fu-k anything up and I want to learn so I'm asking tons of questions everywhere :) My background is in data science. Mobile is much more frustrating because you have to deal with these insane profile/device/Apple settings and procedures. I want to pull my hair out. Can I just code please? ;)

    I've just started exploring Jira, and Monday seems really sick but no free version.
     
  6. wahidovic, Oct 11, 2018 at 7:34 AM
    Last edited: Oct 12, 2018 at 2:56 AM

    wahidovic macrumors newbie

    Joined:
    Thursday
    #6
    be that as it may, can cause issues when things get mind boggling. Simply Google it. We just ran with watchapp-ace dev. Simple and plain as day.
    Whatsapp Messenger Hotstar
     

Share This Page