gitlab-org--gitlab-foss/doc/university/training/topics/feature_branching.md

29 lines
602 B
Markdown
Raw Normal View History

2017-11-01 11:56:40 -04:00
---
comments: false
---
2016-10-20 06:38:32 -04:00
# Feature branching
- Efficient parallel workflow for teams
- Develop each feature in a branch
- Keeps changes isolated
- Consider a 1-to-1 link to issues
- Push branches to the server frequently
- Hint: This is a cheap backup for your work-in-progress code
2019-08-16 08:07:42 -04:00
## Feature branching sample workflow
2016-10-20 06:38:32 -04:00
1. Create a new feature branch called 'squash_some_bugs'
1. Edit '`bugs.rb`' and remove all the bugs.
1. Commit
1. Push
```sh
2016-10-20 06:38:32 -04:00
git checkout -b squash_some_bugs
# Edit `bugs.rb`
git status
git add bugs.rb
git commit -m 'Fix some buggy code'
git push origin squash_some_bugs
```