Advertisement

子项目定期从源仓库获取代码

阅读量:

将clone fock项目下载至本地环境

复制代码
    git clone https://github.com/YOUR_USERNAME/YOUR_FORK.git
    
    
      
    

2.检验项目在远程环境中的当前状态

复制代码
    git remote -v
    # origin  https://github.com/YOUR_USERNAME/YOUR_FORK.git (fetch)
    # origin  https://github.com/YOUR_USERNAME/YOUR_FORK.git (push)
    
    
      
      
      
    

3.建立一个将被同步至 fork 远程仓库的上游存储库

复制代码
    git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git
    
    
      
    

4.再次核实当前状态以确认配置是否已成功完成

复制代码
    git remote -v
    # origin    https://github.com/YOUR_USERNAME/YOUR_FORK.git (fetch)

全部评论 (0)

还没有任何评论哟~