繁体   English   中英

如何设置这个git工作流程?

[英]how to setup this git workflow?

我希望能够设置以下git工作流,但是对于使用哪个正确命令却感到困惑,如变基,远程等?

  1. 克隆一个开放源代码项目,在该项目中,我仅对其git repo具有只读访问权限
  2. 对项目进行更改并将这些更改保存到我的私人github存储库中-让我们将其称为“开发”
  3. 开发人员变更稳定后,将其移至“暂存”
  4. 一旦测试了“ staging”,然后将更改移至“ production”
  5. 每周同步一次远程开源项目,说它总是在变化,然后重新开始整个过程​​。

谢谢

# clone, create and change to branch development
git clone git://the/open/source/project.git
git checkout -b development

# make changes and commit
git add ...
git commit -m '...'

# several commits later, create a branch named staging and change to it
git checkout -b staging

# after testing, create a branch named production and change to it
git checkout -b production

# syncing ( assuming the remote to be named origin and the branch is named master )
git checkout master
git fetch origin master
git merge origin/master

# repeat the process

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM