How to send a request to upload from a cloned repo?

How to send a transfer request from an existing locally-cloned repo?

Often I want to see the source code of some libraries from github, so I clone it. Later, I discovered some problems with the code and put it up on the mailing list, often in passing. The author of the library says: β€œPleasant find, can you send a pull request?”

And the answer is "not so easy." I haven't forked the repo yet, Ive cloned it. And it doesn't seem that I can find to send a pull request from a cloned repo?

If this limit is true, it seems like a reasonable reaction is to fork something and all that you have ever looked at, just so that if you ever want to contribute, you can. And that populates your github account with a lot of inactive forks.

Don't they talk so much about this problem - am I the only person with whom this problem affects?

+68
github pull-request
Feb 16 '13 at 2:09
source share
2 answers

Finish the repo on GitHub, then add the fork replica as remote to your local cloned copy:

git remote add myfork https://github.com/<myGitHubAccountName>/<repoName>.git 

Then you can click on your fork:

 git push myfork master 

If you are doing more than just this request, you can remove the remote origin and name your fork as the source:

 git remote rm origin git remote add origin https://github.com/<myGitHubAccountName>/<repoName>.git 

This is usually what I do. Sometimes I add the original origin as upstream , so I have a link to it.

+49
Feb 16 '13 at 2:13
source share

If you're fine with installing another binary in your path, github has released a small little tool called hub .

If you cloned someone else's repo:

 $ hub fork # This creates a fork and adds your repo as a remote $ git push YOUR_USER feature # push the changes to your new remote $ hub pull-request # will open your browser 
+9
Aug 27 '16 at 23:43
source share



All Articles