I can't merge branches in git #23801
-
I have a repository, to organize its structure, I created a folder and moved my files there and added the change to my master-backup (secondary) branch, I did $git merge for the union with my (main) master, but the changes did not are applied, only my subfolder is empty ,and no errors are returned, only that
What I want, is to add the changes, (which is the folder where I moved my files) to my remote master branch. In the current situation, my master-backup has the files while the master is empty How should I proceed? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
When you use First make sure you’re on the
Then merge in the branch you want:
|
Beta Was this translation helpful? Give feedback.
When you use
git merge
, you need to specify which branch is going to get merged in, and it looks like you may have missed this step?First make sure you’re on the
master
branch:git checkout master
Then merge in the branch you want:
git merge master-backup