debian-mirror-gitlab/doc/gitlab-basics/feature_branch_workflow.md

39 lines
830 B
Markdown
Raw Normal View History

2019-12-26 22:10:19 +05:30
---
2020-10-24 23:57:45 +05:30
stage: Create
group: Source Code
info: "To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers"
2019-12-26 22:10:19 +05:30
disqus_identifier: 'https://docs.gitlab.com/ee/workflow/workflow.html'
---
# Feature branch workflow
1. Clone project:
2020-03-13 15:44:24 +05:30
```shell
2019-12-26 22:10:19 +05:30
git clone git@example.com:project-name.git
```
1. Create branch with your feature:
2020-03-13 15:44:24 +05:30
```shell
2019-12-26 22:10:19 +05:30
git checkout -b $feature_name
```
1. Write code. Commit changes:
2020-03-13 15:44:24 +05:30
```shell
2019-12-26 22:10:19 +05:30
git commit -am "My feature is ready"
```
1. Push your branch to GitLab:
2020-03-13 15:44:24 +05:30
```shell
2019-12-26 22:10:19 +05:30
git push origin $feature_name
```
1. Review your code on commits page.
1. Create a merge request.
1. Your team lead will review the code & merge it to the main branch.