I have my code on my local computer. I created a github repository. I wanted to upload my local code to this remote github repository. This is what I did on terminal:
Then I type:
>git init
>git add .
>git commit -m "First commit"
>git remote add origin https://github.com/usergithub/repository_name.git
Then I went to my github repository and I saw a new branch:

So I click on the green button to make a pull request:

But there is nothing there I can do to merge these 2 branches?
How can I merge the branch to my main project?
I tried different stuff from the terminal:
git push --force origin main
But I get this error message:
error: src refspec main does not match any
error: failed to push some refs to 'https://github.com/usergithub/repository_name.git'
I hope the master branch contains all of your pushed changes
Steps to merge your branch
mainmastermainNow master is merged in main branch and main branch contains all the changes of master branch.
Or you can go to Pull Request tab and click on the Pull request you have created then scroll down you'll able to see the Merge Pull Request Button.
On clicking that button it will merge your branch into main branch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With