如何发 PR

以下以 wiki-pages 为例

  • 把项目 fork 到自己名下,然后 clone 到本地

    git clone git@code.xiaojukeji.com:yexiliang/wiki-pages.git
    
  • 将原始项目加为上游

    git remote add upstream git@code.xiaojukeji.com:op/wiki-pages.git
    
  • 在本地项目建立分支并切换到该分支

    git checkout -b dev
    
  • 在 dev 分支上开发,提交

    touch foo.txt
    git add foo.txt
    git commit
    
  • 切换到 master 分支并合并上游

    git checkout master
    git fetch upstream
    git merge upstream/master
    
  • 切换到 dev 分支,合并 master,推送代码

    git checkout dev
    git rebase master
    git push
    
  • 到 github / gitlab 选 dev 分支发 pull request

相关文章:

  • 2021-07-04
  • 2021-05-16
  • 2021-06-03
  • 2021-12-12
  • 2021-11-08
  • 2022-12-23
  • 2021-06-12
  • 2021-09-08
猜你喜欢
  • 2021-07-24
  • 2021-03-30
  • 2021-08-23
  • 2021-10-12
  • 2021-08-21
  • 2022-01-08
相关资源
相似解决方案