How to maintain a Github fork of a popular project

被刻印的时光 ゝ 提交于 2019-12-03 08:46:19

问题


I forked a popular github project to make certain minor adjustments for my needs. However I want to keep my fork up to date with the master repo. What I did initially was fork via the github ui, then pushed my changes directly to this fork from my dev env. I'm not entirely convinced I should have done this as I think it makes pulling updates from the master repo difficult.

What's the recommended method for maintaining a fork in this fashion and what do I have to change about my current setup?


回答1:


You can configure to remote repositories to use in git. In the project cloned from your fork, type the following comand: git remote add name url where name is a alias to a url that represents the master repo.

With that, to bring the new updates from the master repo, just type: git pull name master. To send the changes to your fork repo: git push origin master.



来源:https://stackoverflow.com/questions/14288511/how-to-maintain-a-github-fork-of-a-popular-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!