0

Say I have two remote git branches, A and B.

I want branch A to contain the contents of branch B and later remove B, so that only branch A remains with B's original contents.

Unfortunately, the remote repository won't allow my to simply delete the branch A, so I'm stuck with somehow copying over B into A.

Is this possible using only git commands?

nbubis
  • 2,304
  • 5
  • 31
  • 46

1 Answers1

1

yes, this is git's core feature. have a look at https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging

$ git checkout A
$ git merge B

you then could delete B following this answer: How do I delete a Git branch both locally and remotely?

Community
  • 1
  • 1
wbrmx
  • 71
  • 3