2

I am new in Git and I want to implement this tool in my next project. In my project I created 3 branches these are:

1. Feature - new features
2. Release - new production release
3. Hotfix - for minor revisions

What I understand is you can use branch to separate the updates and also to leave the master untouched and stable.

Is it necessary to create a series branches even I'm a single developer?

Can you provide me a simple workflow for a single developer?

Jerielle
  • 7,144
  • 29
  • 98
  • 164
  • What are you planning to develop and where do you plan on releasing it, if anywhere? – Tim Biegeleisen Jul 27 '15 at 01:58
  • 2
    Personally, as a single dev I like to use a stable `master` branch, as well as a branch for each feature. Here's a thread where tons of people weigh in: https://stackoverflow.com/questions/2428722/git-branch-strategy-for-small-dev-team – Maximillian Laumeister Jul 27 '15 at 01:59

2 Answers2

2

I would say using git branches is almost as useful as single developer as it is with team. Also, it is so cheap to do, there is no reason not to really, with branch definitions costing 40 bytes on the disk and only file deltas stored.

Git flow is popular: http://nvie.com/posts/a-successful-git-branching-model/

... but to get started, try github flow: http://scottchacon.com/2011/08/31/github-flow.html

Billy Moon
  • 57,113
  • 24
  • 136
  • 237
1

You seem to be taking the branch names from gitflow. But it's not about the 3 branches really. It's about separating the changes themselves, so that when you start working on a specific feature that will take a longer time, you can use branch feature/the-awesome-stuff and leave master unaffected until you're ready to merge back.

If you have a big project with release schedules, stable versions, and a need for hotfix releases, you can go with feature/*, release/*, hotfix/*. There are both detailed explanations and critiques of gitflow that you can find on google. But for a small project with one person, that's most likely overkill. Just use what you need in that case.

viraptor
  • 33,322
  • 10
  • 107
  • 191