Git branches in a solo project

Is there any reason to create branches for functions in a git repo solo? When I merge them back into masters, they accelerate forward, and there is no real evidence that I am even branched in the first place. Should I even bother?

+6
source share
2 answers

Branches can be really useful even in a solo project. They allow you to develop new functions in isolation (if necessary), while allowing you to throw away work and / or keep it separate from the main development (so that you can launch new functions from a clean, stable part of your code base).

(You can also prevent merging fast forwarding by passing the --no-ff flag to git merge .)

+12
source

You can team up without fast forwarding, check for example. What is the difference between `git merge` and` git merge -no-ff`?

And answering your question, I use branches in my solo projects, for example. to highlight experimental features. Maybe I want to switch from Bootstrap to Zurb or from Knockout to Angular, and a separate branch will give me peace of mind.

+1
source

Source: https://habr.com/ru/post/946804/


All Articles