Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature edit workflow #5

Merged
merged 5 commits into from
Nov 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions doc/git-workflow/git_workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Git Workflow - Draft
============

## Intro

Of course there is no One True Way™ of working with code across teams, and no document should keep you from improving things or doing something you using your best judgment find necessary.

![Image description](git_workflow_img.jpg)

## The Master Branch

The **Master Branch** should be considered sacred, the code should always be working and be ready to use.

You should never work directly in master and never push to it from a local version or from any branch other than the **development-branch**.

Generally nothing should happen in the the **Master branch** unless there is a new release.


## Development Branch

The **development branch** is from where everyone branches off and merges in most of their new code.

As with the master branch it should always be working, but not necessarily be ready for release.

Try to never write code directly to this branch. Make a pull requests from the relevant feature branch and assign one or two developers to review the code.

## Feature Branches

When working on a new feature a **feature branches** should be created from the development branch.

Try to make pull requests from a working branch and assign one or two developers to review the code.
Feature branches should be named: `feature_[branch_name]`

## Working branches

These are branches created from a feature branch where a developer can work freely.
Working branches should be named: `[initials]_[branch_name]`


## New Code

### Create a New Branch

1. Update the **master**, **dev** and/or **feature** branches to latest version(s)
2. Create branch
- Always create a new branch from the place it will be merged back into
- names should be kept short and descriptive.
- prefixed with initials (eg. `JB_branch_name`)

### Pushing and Commiting Changes

3. Make changes
- Make sure everything is running (build, tests, etc)
4. Pull branch for any changes (If not working alone on specific branch)
5. Commit with descriptive name
- prefix with `[WIP]` ("work in progress") if anything is broken.
6. Push branch up to github

### Pull Request

7. Open pull request into relevant branch
- Write a descriptive title of task
- Bullet points with descriptions of changes
- assign one or two people to review changes.

### Code Review

8. Other devs should review code and try to leave constructive notes if necessary
- check for potential issues
- if confusing to you, probably confusing to someone else
- general improvements

9. Code owner is responsible for making any necessary fixes any pushing them up
- Follow same commit process

10. Other devs should give the code the thumbs up (at least two other devs)
- add short text of why you are okay with merging the pull request

### Merging Code

Once you have had enough people review it, you are confident in the code you have written, and everything is well tested and passing. You can start the deploy process.

11. Merge the pull request into the **staging** or **feature** branch, and then delete it on github.
12. Run applicable test again on the merged code.

#

## Additional stuff and resources

- [A Successful Git Branching Model](http://nvie.com/posts/a-successful-git-branching-model/)
- [Understanding the Git Workflow](https://sandofsky.com/blog/git-workflow.html)
- [Github: Understanding the Git Flow](http://guides.github.com/overviews/flow/)
- [Issues with Git Flow](http://scottchacon.com/2011/08/31/github-flow.html)
Binary file added doc/git-workflow/git_workflow_img.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.