开发者

cloned a git repository from github - how do i create a new github repository into a repository into my account

开发者 https://www.devze.com 2023-04-03 23:14 出处:网络
I did a: git clone http://github/anotheruser/something.git my-space and made some chang开发者_开发知识库es. Is there anyway I can create a git repository in my account and commit my changes to it? I

I did a: git clone http://github/anotheruser/something.git my-space

and made some chang开发者_开发知识库es. Is there anyway I can create a git repository in my account and commit my changes to it? I am aware I should have forked.

thx


The simplest solution is to fork the repository on GitHub, and then edit the .git/config file in your local copy so that origin points to your newly forked repository instead of the original one. You should then be able to push to it as normal.

If you prefer, you can use this command instead of editing the file:

git remote set-url origin <YOUR-REPO-URL>
0

精彩评论

暂无评论...
验证码 换一张
取 消