Syncing a fork
博客专区 > FeanLau 的博客 > 博客详情
Syncing a fork
FeanLau 发表于4个月前
Syncing a fork
  • 发表于 4个月前
  • 阅读 5
  • 收藏 0
  • 点赞 0
  • 评论 0

【腾讯云】新注册用户域名抢购1元起>>>   

Sync a fork of a repository to keep it up-to-date with the upstream repository.

Before you can sync your fork with an upstream repository, you must configure a remote that points to the upstream repository in Git.

1, Open Git Bash.

2, Change the current working directory to your local project.

3, Fetch the branches and their respective commits from the upstream repository. Commits to master will be stored in a local branch, upstream/master.

4, Check out your fork's local master branch.

5, Merge the changes from upstream/master into your local master branch. This brings your fork's master branch into sync with the upstream repository, without losing your local changes.

If your local branch didn't have any unique commits, Git will instead perform a "fast-forward":

  • 打赏
  • 点赞
  • 收藏
  • 分享
共有 人打赏支持
粉丝 3
博文 201
码字总数 117920
×
FeanLau
如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
* 金额(元)
¥1 ¥5 ¥10 ¥20 其他金额
打赏人
留言
* 支付类型
微信扫码支付
打赏金额:
已支付成功
打赏金额: