Skip to content

Instantly share code, notes, and snippets.

@li2
Last active March 20, 2018 07:02
Show Gist options
  • Save li2/5a02048f4d0edefe3deeeb8f28f1b81f to your computer and use it in GitHub Desktop.
Save li2/5a02048f4d0edefe3deeeb8f28f1b81f to your computer and use it in GitHub Desktop.
[Git Feature Branch Workflow] The core idea behind the Feature Branch Workflow is that all feature development should take place in a dedicated branch instead of the master branch. #tags: git

The core idea behind the Feature Branch Workflow is that all feature development should take place in a dedicated branch instead of the master branch. This encapsulation makes it easy for multiple developers to work on a particular feature without disturbing the main codebase. It also means the master branch will never contain broken code, which is a huge advantage for continuous integration environments.

pull requests make it incredibly easy for your team to comment on each other’s work.

link: Git Feature Branch Workflow

Start with the master branch

git checkout master
git fetch origin
git reset --hard origin/master

Create a new-branch

git checkout -b new-feature

Update, add, commit, and push changes

git status
git add <some-file>
git commit -m "add your commnets here"

Push feature branch to remote

git push -u origin new-feature

Resolve feedback

Now teammates comment and approve the pushed commits. Resolve their comments locally, commit, and push the suggested changes to Bitbucket. Your updates appear in the pull request.

Merge your pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment