GitLab: Feature Branch Workflow

Make Your Feature Branch

  1. Clone project:
    • git clone git@example.com:your-project.git
  2. Create a new branch with your feature:
    • git checkout -b new-feature-branch
  3. Create a file:
    • touch test.py
  4. Update the index using the current content found in the working tree, to prepare the content staged for the next commit:
    • git add test.py
  5. Record changes to the repository:
    • git commit -m "Make some updates on test.py"
  6. Push the branch to GitLab as explained in [2]:
    • git push -u origin new-feature-branch
  7. Find the merge request URL in the prompt:
    • remote: http://gitlab-server/your-username/your-repo-name/merge_requests/...
  8. Open the merge request URL using a web browser

What can you do on the merge request page?

https://docs.gitlab.com/ee/user/project/merge_requests/getting_started.html

Two useful features for beginners:

References

[1] https://docs.gitlab.com/ee/gitlab-basics/feature_branch_workflow.html
[2] https://stackoverflow.com/questions/17096311/why-do-i-need-to-explicitly-push-a-new-branch/17096880#17096880

本篇發表於 未分類。將永久鏈結加入書籤。

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *