Skip to content

Instantly share code, notes, and snippets.

@thaicloud
Last active August 29, 2015 14:26
Show Gist options
  • Save thaicloud/09d3aca41a6fcc20cddb to your computer and use it in GitHub Desktop.
Save thaicloud/09d3aca41a6fcc20cddb to your computer and use it in GitHub Desktop.
Example Git Feature Workflow
// Create feature branch
git checkout -b feature/tiny-change
echo 'Hello world' > foo.txt // make whatever changes
git add .
git commit -m "Add great text file"
git push origin feature/tiny-change
// Happy with changes, merge to develop
git checkout develop
git merge --no-ff feature/tiny-change
git push origin develop
// Archive feature branch
git checkout feature/tiny-change
git tag archive/tiny-change
git push origin archive/tiny-change
// Delete feature branch
git checkout develop
git branch -d feature/tiny-change
git push origin –delete feature/tiny-change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment