Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

git - How to automatically align/sync a forked Github origin/master branch to upstream/master?

Is there a way to automatically sync my forked Github repository's remote master branch (origin/master) to an original Github repository's master branch? (upstream/master)

I ask because I would like my forked remote origin/master branch on Github to always stay up-to-date so that I could save time by not needing to continually pull / rebase & push upstream repository changes into my forked repo's master branch.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

It is very easy to sync forked repository but question is how ?

In this example i am using WorldMapGenerator Repository

Go to your forked repository, you can see setting button click on it.

enter image description here

After clicking on setting button you can see Webhooks & services option in left menu click on it.

enter image description here

Then you can see Add Webhook Button on right side just click on it.

enter image description here

After clicking Add Webhook Button, details page will get open, so in detail page yo can see payload url. Enter http://backstroke.us url in it.

enter image description here

Now If any commit goes in main repository, then pull request will come in your forked repository.

That's it enjoy :)

For more details https://github.com/1egoman/backstroke


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...