debian-mirror-gitlab/doc/topics/git/feature_branching.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
837 B
Markdown
Raw Normal View History

2021-06-08 01:23:25 +05:30
---
2021-09-04 01:27:46 +05:30
stage: Create
group: Source Code
2022-11-25 23:54:43 +05:30
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
2021-06-08 01:23:25 +05:30
comments: false
---
2021-09-04 01:27:46 +05:30
# Feature branching **(FREE)**
2021-06-08 01:23:25 +05:30
- 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
2022-07-16 23:28:13 +05:30
- Hint: Pushing branches is a cheap backup for your work-in-progress code.
2021-06-08 01:23:25 +05:30
## Feature branching sample workflow
2022-07-23 23:45:48 +05:30
1. Create a new feature branch called `squash_some_bugs`
2021-06-08 01:23:25 +05:30
1. Edit '`bugs.rb`' and remove all the bugs.
1. Commit
1. Push
```shell
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
```