Answer the question
In order to leave comments, you need to log in
How to develop in multiple branches?
There is a branch master
(102 commits on the remote repository), a branch went from it staging
(104 commits, i.e. + 2 commits are already there, also already on the remote repository). I started developing new functionality
.
But there was a small bug.
I went back to , made changes, pushed from there (from ). It turned out 103 commits.
Will there be problems/conflicts with ? files edited different in these branches.
What is the right thing to do in this case?
Thanks staging
master
master
merge
Answer the question
In order to leave comments, you need to log in
No, if different files were edited, then there will be no conflicts.
When you work on a branch, be sure to keep it up to date with the master. Those. in this case, after pushing to master (167), switch to the staging (104) branch and merge the master into it. Even if there are conflicts, resolve them in this separate branch without touching master.
You may not be able to eat it today, but when you can, remember:
1. No commits to master, except merge (preferably with --squash) from a tested commit in the release branch
2. No stage branch, because stage is a state release branch. If you have a stage server (which is more than reasonable), push the release branch to it.
3. If possible, cut features in separate branches, which, if possible, branch from master and merge into the release branch.
4. In any case, branch the release branch from the last [stable, there should be no others in the master, see point 1] commit in the master
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question