0

I did clone a repository main to secondary two months ago. The two repositories have many branches.

I am sure that many branches of main has been update by new commits (let’s admit that I don't know witch branch has been updated). And I know that the secondary has not been modified since my last clone.

I want to merge all branches of my main branch to the secondary branch without losing history (dropping all modification that has been done in the main branch to the secondary branch).

I've already spent a lot of time reading the Git User's Guide and so on. However, this (special) case of use doesn't seem to be documented anywhere.

Dorga
  • 19
  • 4
  • Branches don't have branches, in Git. In a sense, branches don't even *exist*, at least not until you define what you mean by the word "branch". You'll need to define what you mean here. Apart from that, *history* in a Git repository is nothing more or less than the set of *commits* in that repository. You only "lose history" if you give up some commits. – torek Jan 13 '22 at 05:10
  • by branch I mean a git branch in bitbucket – Dorga Jan 13 '22 at 10:46
  • So, by "branch" you mean "branch"? (I hope you understand the circular reasoning issue here.) See [this question](https://stackoverflow.com/q/25068543/1256452) first, *then* define what you mean by branch. – torek Jan 13 '22 at 11:30

0 Answers0