A
A
Alexander risok2021-10-13 11:34:55
git
Alexander risok, 2021-10-13 11:34:55

Does the branch from which I create a new one affect anything other than the state of the files?

If I branch featA from master, make commits, then create featB from featA, create commits and send a merge request to gitlab in master when featA is already merged - will there be any problems?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Antony, 2021-10-13
@SelfCrafter

If no one has committed anything to master, then after merging featA to master, master will have the same commits that were in featA.
Accordingly, there will be no difference between master and featA.
If someone changed master, then when you merged featA into the master, you most likely had to resolve conflicts and as a result you got another commit that fixes these conflicts -> accordingly master will be 1 commit different from featA. You will need to either merge featB with master, rebaise your featB, or cherry-pick the merge commit

D
Dmitry Shitskov, 2021-10-13
@Zarom

A very general question. There are many options for situations, depending on what were the changes in featA and featB.
In most cases, the merge to master will pass without problems, but without fast-forward.
If there were conflicting changes, you will have to resolve the conflicts in the merge process, or perform a merge or rebase (depending on what you have accepted) master -> featB

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question