S
S
suhuxa12018-04-20 18:18:47
git
suhuxa1, 2018-04-20 18:18:47

Do I understand the essence of branches in git correctly?

Good afternoon!
I've been working with the git for half a year, or rather with a couple of buttons: commit and push. I do nothing else, except that I restore the previous version of the code if something is wrong. I wanted to open the git in more detail, suddenly there is something else interesting. I work alone. Himself and a proger, himself and a tester. The question arises - do I need to create different branches? As far as I understand, they are created only so that there are no conflicts, and several developers can simultaneously cut different functionality, after which they would merge it with the main branch. But once again I come across the fact that a lone programmer works with 2-4 branches. What for? Or does it make any sense?
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
SagePtr, 2018-04-20
@SagePtr

In addition to suberg , another example: a single developer decided to implement some one new feature that will take some time to develop. During the time that this feature is being developed, it may urgently be necessary to introduce some bug fixes into the stable code, without waiting for the end of work on this feature, without adding a semi-finished version of the feature to the finished product, and without rolling back and forth. And then, when the feature is ready and tested, just pour it into the main one. This is the simplest example, when we have two branches, conditional stable and development.
You can also work on several features at once and they can be at different stages of readiness, then it’s also easier to split them into two different branches, so that you can later add to the main branch the one that will be completely ready before, without waiting for the other one to be finalized.

A
aol-nnov, 2018-04-20
@aol-nnov

official documentation ?? Never! Too difficult!!1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question