{"id":2820,"date":"2021-01-24T09:11:06","date_gmt":"2021-01-24T14:11:06","guid":{"rendered":"http:\/\/codinggorilla.com\/?p=2820"},"modified":"2021-01-24T11:19:29","modified_gmt":"2021-01-24T16:19:29","slug":"forking-a-git-repo-more-than-once","status":"publish","type":"post","link":"http:\/\/165.227.223.229\/index.php\/2021\/01\/24\/forking-a-git-repo-more-than-once\/","title":{"rendered":"Forking a Git repo more than once"},"content":{"rendered":"\n<p>Github does not support forking a repo more than once. If you try to do that, it&#8217;ll just redirect to your original fork. That could be a problem if you have an outstanding pull request on a branch you want to modify for an unrelated change. Rather than muck around with the forked repo, create a new for this way.<\/p>\n\n\n\n<ul><li>git clone https:\/\/github.com\/antlr\/antlr4.git antlr4-pr2<\/li><li>In Github, create a new repo <em>antlr4-pr2<\/em>.<\/li><li>git remote rename origin upstream<\/li><li>git remote add origin https:\/\/github.com\/<em>yourgitid<\/em><githubid>\/antlr4-pr2.git<\/githubid><\/li><li>git remote -v<\/li><li>git push -v origin master<\/li><\/ul>\n\n\n\n<p>The main problem with this approach is that Github imposes a lot of restrictions on what you can do. Github &#8220;pull requests&#8221; cannot be performed from repositories that haven&#8217;t been explicitly &#8220;forked&#8221; through the UI. It might be best to follow the normal workflow: fork the repo, clone it, &#8220;git branch foobar&#8221;, &#8220;git checkout foobar&#8221;, then make your changes and checkin and publish from the Github Desktop app.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Github does not support forking a repo more than once. If you try to do that, it&#8217;ll just redirect to your original fork. That could be a problem if you have an outstanding pull request on a branch you want to modify for an unrelated change. Rather than muck around with the forked repo, create &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/165.227.223.229\/index.php\/2021\/01\/24\/forking-a-git-repo-more-than-once\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Forking a Git repo more than once&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/posts\/2820"}],"collection":[{"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/comments?post=2820"}],"version-history":[{"count":0,"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/posts\/2820\/revisions"}],"wp:attachment":[{"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/media?parent=2820"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/categories?post=2820"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/165.227.223.229\/index.php\/wp-json\/wp\/v2\/tags?post=2820"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}