簡體   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