2015-04-26 12:48:37 +05:30
|
|
|
# Feature branch workflow
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2019-10-12 21:52:04 +05:30
|
|
|
1. Clone project:
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2019-10-12 21:52:04 +05:30
|
|
|
```bash
|
|
|
|
git clone git@example.com:project-name.git
|
|
|
|
```
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2019-10-12 21:52:04 +05:30
|
|
|
1. Create branch with your feature:
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2019-10-12 21:52:04 +05:30
|
|
|
```bash
|
|
|
|
git checkout -b $feature_name
|
|
|
|
```
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2019-10-12 21:52:04 +05:30
|
|
|
1. Write code. Commit changes:
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2019-10-12 21:52:04 +05:30
|
|
|
```bash
|
|
|
|
git commit -am "My feature is ready"
|
|
|
|
```
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2019-10-12 21:52:04 +05:30
|
|
|
1. Push your branch to GitLab:
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2019-10-12 21:52:04 +05:30
|
|
|
```bash
|
|
|
|
git push origin $feature_name
|
|
|
|
```
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2019-10-12 21:52:04 +05:30
|
|
|
1. Review your code on commits page.
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2019-10-12 21:52:04 +05:30
|
|
|
1. Create a merge request.
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2019-10-12 21:52:04 +05:30
|
|
|
1. Your team lead will review the code & merge it to the main branch.
|