Skip to content

Latest commit

 

History

History
83 lines (57 loc) · 2.72 KB

dev_process.adoc

File metadata and controls

83 lines (57 loc) · 2.72 KB

Development Workflow

  1. Checkout new branch based on the develop branch

    $ git checkout -b mybranch origin/develop
  2. (Optional) push local branch to GitHub for collaboration

    $ git push --set-upstream origin mybranch
  3. Code feature, add file to be commited

    $ git add myfileIchanged.js
  4. Commit to branch as needed

    $ git commit -m 'added foo'
  5. (Not required if single commit already) Squash commits into one commit when ready for pull request with 4 easy steps

    • Checkout develop branch and pull the latest changes

      $ git checkout develop && git pull
    • Checkout your branch again, and merge the develop branch into it

      $ git checkout mybranch && git merge develop
    • Soft reset to the last commit from the develop branch (this leaves your changes ready to commit again)

      $ git reset --soft origin/develop
    • Make a final commit that will be used for the pull request

      $ git commit -m 'my actual commit'
      $ git push --set-upstream origin mybranch
    Note

    If you have already pushed your branch to GitHub before resetting the branch, you may have to use a force push (If anyone else is using the branch, they will need to pull before making any other changes)

    $ git push -f
  6. Submit a pull request for your branch

    Tip
    To submit a pull request in GitHub
    • On the GitHub project page, click New pull request

    • Select "develop" for the base branch, and "your branch" for the compare branch

    • Enter useful comments, reference the story being worked on or general bug fix

    • Click Create pull request

  7. Once the pull request has been reviewed, merge pull request to develop branch

    • In the pull request, click Merge pull request, then click Close pull request

    Note

    Any commits to the develop branch will kick off a Wercker job that will deploy the application to a PCF development environment

  8. When features are ready to go to production, merge develop to master

    • Option 1 - Create pull request in GitHub to merge develop into master

      • On the GitHub project page, click New pull request

      • Select "develop" for the base branch, and "your branch" for the compare branch

      • Enter useful comments, reference the story being worked on or general bug fix

      • Click Create pull request

    • Option 2 - use CLI to merge develop into master

      $ git checkout develop && git pull
      $ git checkout master && git pull
      $ git merge develop && git push
    Note

    Any commits to the master branch will kick off a Wercker job that will deploy the application to Production in a PCF environment