Skip to content

GitHub Workflow

Stamo Gochev edited this page Jun 12, 2015 · 22 revisions

The work-flow illustrated here is the way we should handle content and source in the master branch of the ajax-docs repository.

Minor Changes

Minor changes like fixing typos, grammatical corrections can be directly pushed in the master branch, without making a Pull Request, or creating a new branch.

  1. Make sure you are working with the latest changes pulled from GitHub (Pull with Re-base);

  2. Implement the required changes;

  3. Stage the affected files (Stage Files);

  4. Commit the changes locally (Committing);

  5. Again, pull any changes from GitHub to make sure that the push will be sucessful (Pull with Re-base);

  6. Push your commit to GitHub (Pushing Commits)

Major Changes

Major changes are more complex fixes, re-structuring articles etc. Working on such matters is mandatory to be done in a branch, that later to be used for a Pull Request.

  1. Make sure you are working with the latest changes pulled from GitHub (Pull with Re-base);

  2. Create and Checkout branch with a meaningful name (Create new Branch and Checkout Branch);

    Tip: You can use one command for both actions git checkout -b MyBranch

  3. Publish the branch to GitHub (Push Branch to GitHub);

  4. Changes made on the branch can be done in several commits (as much as you need, in order to have proper history/backlog) (Push Commits to Branch).

    If there are other collaborators working on this branch, you should periodically pull and push changes to the piblished branch in GitHub.

  5. When the task is done, make sure the branch is synced with the master branch (Syncing Changes from the Remote's master Branch);

  6. Push any additional changes derived from the master branch (Push Commits to Branch);

  7. Initiate a Pull Request from GitHub (Pull Requests).

    Important: GitHub will alert you if the Pull Request is clean. If this is not so, go back to your local repository and make sure any conflicts are locally resolved.

Features

Working with feature changes, i.e., documentation that should not be live immediately, but e.g., the next official release.

The work-flow is the same as in Major Changes. The difference is, that the Pull Request should be initiated on the desired release date.

Tip: Synchronization of changes from master to the feature branch should be done just before the Pull Request. You can always sync changes multiple times.

Clone this wiki locally