Skip to content

Instantly share code, notes, and snippets.

@Natedeploys
Created November 14, 2018 12:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Natedeploys/ba17ce03b54a1106c74cf5329d3cd4e2 to your computer and use it in GitHub Desktop.
Save Natedeploys/ba17ce03b54a1106c74cf5329d3cd4e2 to your computer and use it in GitHub Desktop.
Github Feature Workflow

Developer contributions:

In order to contribute to this repository, we are following the Github pull request workflow.

  1. Update your local repository to the newest commit, execute:

git pull

  1. Create a new branch based on a feature and switch to it using:

git checkout -b feature_x

  1. Verify in your terminal you are currently on the new branch using:

git branch

  1. Make your changes to the codebase, when ready begin committing and pushing

git add .
git commit -m "i made some changes to x"
git push origin feature_x

  1. Go to the github repository and submit the pull request, using our PULL_TEMPLATE.md

  2. If there are no conflicts, wait for the pull request to be accepted or rejected.

  3. If there are conflicts, you must either:

    • Resolve conflicts at the Pull Request one at a time
    • If conflicts are too many, in the local repository
      • switch to master
        git checkout master
      • update the master repository
        git pull
      • then merge with the feature branch
        git merge feature_x
      • If you need more information, see the Github easy guide update & merge section
  4. If your pull request was accepted, you can safely delete the branch within Github after merge or locally doing the following:

    • Make sure you are on the master
      git checkout master
    • Safely delete the branch
      git branch -d feature_x
  5. When you have a new feature to develop, please create a new branch and work from there.

Github easy guide: http://rogerdudler.github.io/git-guide/
Git feature workflow: https://gist.github.com/blackfalcon/8428401

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