叉可以在gitHub中自动同步吗? [英] Can forks be synced automatically in gitHub?

查看:493
本文介绍了叉可以在gitHub中自动同步吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果选中,Stash启用自动分叉同步:



在你的情况下,你需要说服上游repo(你分叉的那个)的维护者注册 backstroke webhook。< br>
您会看到PR(拉取请求)自动出现在叉子上,让您接受(保持您与原始回购站进行的任何演变同步)。


Stash enables automatic fork syncing if selected: https://confluence.atlassian.com/display/STASH/Keeping+forks+synchronized
It will update any branches in your fork that you haven't modified.

I've been unable to find similar automatic functionality in gitHub; all google searches are turning up manual ways to sync forks via your local cache.

解决方案

You could define a webhook to listen to upstream (the original repo) changes, and update your fork.

In June 2016, you now have the service backstroke.us which listens to those events for you. No need to write your own listener.
See 1egoman/backstroke

  1. Create a webhook in either a fork or a upstream repository. (Settings => Webhooks & Services => Add Webhook)
  2. Add http://backstroke.us as the payload url.
  3. Push some code to the upstream repository to see Backstroke in action.

In your case, you would need to convince the maintainer of the upstream repo (the one you have forked) to register that backstroke webhook.
You will see PR (pull requests) appear automatically on your fork, for you to accept (keeping you in sync with any evolution done on the original repo side).

这篇关于叉可以在gitHub中自动同步吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆