Skip to content
Tim Wood edited this page Mar 5, 2016 · 23 revisions

Getting started developing in this project

Master branch will only contain merge branches that have been tagged Master. Should always work and "be pristine".

Git process overview and rules

Create develop branch, and then a feature branch to do the work Pull requests are made against develop When develop gets to a state we want to commit, we tag and push to master

no commits directly to master or develop - all done as pull requests develop gets updated via pull requests master gets it updates from develop

How to setup your local environment

Git development steps

  • Each time you are starting work, pull from the canonical drupal-gov-con develop branch to your local develop branch
    git fetch upstream; git checkout develop; git merge upstream/develop
  • Create a feature branch to work in (git flow is an excellent set of extensions/commands for managing branches), each feature branch should be titled "issue-n-feature-name" based on an issue from the canonical Github project
  • [Optional - one time] Initialize git flow
    git checkout -b master origin/master; git checkout develop ; git flow init -d
  • Create feature branch with git flow
    git flow feature start [featureName]
  • Do your work in Drupal and export anything to code
  • Stage and commit changes to your feature branch in small, incremental, meaningful commits with helpful commit messages
  • When finished with your feature:
  • push your feature branch to your forked repo
    git push origin [featureName] (OR git flow feature publish [featureName]if you are using git flow)
  • create a pull request against drupal-gov-con develop branch (more on pull requests)
  • review and merge in github OR review and merge locally

Remember, each time you create a feature branch, make it from a fresh pull of develop