2018-03-17 18:26:18 +05:30
|
|
|
---
|
|
|
|
comments: false
|
|
|
|
---
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
# 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-10-12 21:52:04 +05:30
|
|
|
## Feature branching sample workflow
|
2017-08-17 22:00:37 +05:30
|
|
|
|
|
|
|
1. Create a new feature branch called 'squash_some_bugs'
|
|
|
|
1. Edit '`bugs.rb`' and remove all the bugs.
|
|
|
|
1. Commit
|
|
|
|
1. Push
|
|
|
|
|
2020-03-13 15:44:24 +05:30
|
|
|
```shell
|
2017-08-17 22:00:37 +05:30
|
|
|
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
|
|
|
|
```
|