FC5570
FC5570

Reputation: 305

How to move files from one git branch to another

I have a git repository with 2 branches. I want to move all the files of the 2nd branch to the main branch. Is it possible to do so? If yes, how?

Upvotes: 1

Views: 4371

Answers (1)

SwissCodeMen
SwissCodeMen

Reputation: 4875

You can‘t move files, but you can merge one branch to another. So both branch have the same files.

git checkout main
git merge <your 2nd branch>

Upvotes: 3

Related Questions