Create a pull request for a single commit made on a fork fork on github

So,

I have the following situation. There is the original repo on github: Repo A. Also there is a fork, which contains some excellent additions to this repo: Repo B.

So, I unlocked Repo B and added some nice code. I created a transfer request, and the owner Repo Basked me to make a transfer request directly to Repo A.

Now the situation is as follows:

Repo A (original)
     |
     
Repo B (some great features)
     |
     
Repo C (my fork, has some changes that need to go to Repo A directly)

But I cannot make a transfer request directly to Repo A, which contains only my changes. The reason is because there are several other changes (made to Repo B) that my change is based on. What I get when I create a transfer request at the moment is all the changes made to Repo B, plus the change I made for Repo C.

In github, I cannot make the second fork of the project since the name is already in use.

So what should I do now? Is there a command line to solve this problem?

+4
source share
1 answer

Add repository A as remote to the local repository:

git remote add repo-a <url>
git fetch repo-a

, . master, README CONTRIBUTING .

git checkout -b my-feature repo-a/master

my-feature ( , ). cherry-pick, , , <hash> - :

git cherry-pick <hash>

, pull. , (, origin - ):

git push origin my-feature

my-feature master A.

+3

Source: https://habr.com/ru/post/1525045/


All Articles