S
S
Svetlana2021-04-06 14:39:54
git
Svetlana, 2021-04-06 14:39:54

Pull Request: There isn't anything to compare?

Hello.
I created a repo on GitHub and copied the project files from the computer to the master / main branch - I committed it.
further in the folder with files, I opened git bash locally, created a local repo and linked it to the repo on GitHub.
in the local repo I created a second addcode branch from master and worked in it. made a few commits and pushed to the remote repo, where the addcode branch appeared with the commits.
Next, I wanted to make a Pull request from addcode to master/main, which I got There isn't anything to compare.
I thought that if addcode in the local repo forks from master, the same will happen in the remote repo when I push the commit branch. But from what I read on the internet about this issue, I conclude that on the remote repo, the master / main and addcode branches are independent of each other. and therefore it is not possible to make a Pull Request. Is this the case or is there another problem?
If so, what was the right way to do it? On GitHub, also create an addcode branch from master/main and then push commits from the local addcode branch?
Or after I copied the files to GitHub, did I have to create an additional branch, clone my repo to my local computer and then commit and push? But in this case, I will duplicate the files that I already have on my computer.

Clarification: I do not need to merge 2 branches (albeit independent of each other, but to make a Pull Request and not merge it.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question