-
Notifications
You must be signed in to change notification settings - Fork 294
GitHub Workflow
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 like fixing typos, grammatical corrections can be directly pushed in the master branch, without making a Pull Request, or creating a new branch.
-
Make sure you are working with the latest changes pulled from GitHub (Pull with Re-base);
-
Implement the required changes;
-
Stage the affected files (Stage Files);
-
Commit the changes locally (Committing);
-
Again, pull any changes from GitHub to make sure that the push will be sucessful (Pull with Re-base);
-
Push your commit to GitHub (Pushing Commits)
-
Rebase your changes into the vNext branch so everyone works with the latest content (Merging Changes from one Branch to Another)
Major changes are more complex fixes, re-structuring articles etc. Working on such tasks should be done in a branch, that later to be used for a Pull Request.
-
Make sure you are working with the latest changes pulled from GitHub (Pull with Re-base);
-
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
-
Publish the branch to GitHub (Push Branch to GitHub);
-
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.
You should also rebase your branch from its base branch before you start working. This will ensure it is always up to date with its source branch and you work with the latest version of the content.
-
When the task is done, make sure the branch is synced with the parent branch (usually master) (Syncing Changes from the Remote's master Branch);
-
Push any additional changes derived from the master branch (Push Commits to Branch);
-
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.
This section treats working with feature changes, i.e., documentation that should not be live immediately, but with the next official release of the UI for ASP.NET AJAX suite. For example, if you are working on the documentation of featureX that should go live with Q1 2016 and it is still the autumn of 2015, here is the process you should follow.
-
Make sure the
vNext
branch exists. It should bear the name of the next official release (e.g.,Q12016
,Q32016
,Q22017
). Make sure it is at the head of themaster
branch. -
Checkout the
vNext
branch (e.g., usegit checkout Q12016
). -
Create a branch that describes the feature you will be documenting (e.g.,
git checkout -b featureX
). -
Publish the branch(es), commit your changes, etc.
-
Make sure to rebase your branch from its base branch before you start working the next time. Make sure the base branch is up to date with upstream to ensure you will not delete someone's work (i.e., pull and rebase it first).
-
When you are done, open a Pull Request to merge your work into the
vNext
branch and ensure you have already rebased it fromvNext
.
The goal is to ensure that the vNext
branch is always up-to-date with the latest content that is live from the master branch (see Minor Changes which ensures vNext
is updated) and that the history of all the branches in the repo is linear.
When it is time to release the documentation, vNext
will be merged into master
which should not have conflicts and will not need review. This can be done with or without a Pull Request.
Generally, articles should be reviewed by another person before going live to improve their quality.
For new articles that have not existed yet, it is best to create a branch (this can be the feature branch for a set of articles that stems from the vNext branch).
It is recommended that articles pass through peer review by your team before they are published and/or sent for copy editing by a single person. If this is impossible, it is still good to have the peer review after the copy-editing phase, and if there are changes they should be copy-edited again.
Always keep the Style Guide in mind when writing/editing/reviewing.
Here follows a general description of the processes.
Once you are done writing, you should:
-
Get a Peer Review from your team, if possible, and apply the changes you agreed on.
-
Open a Pull Request and assign it to the person who will review it (e.g., copy editor).
-
When you are done with the discussion, rebase your change/feature branch from the source branch and merge it to the base branch (be it vNext or master).
-
In most cases you can then delete the change/feature branch afterwards.
For articles that exist live and need to be improved:
-
open an Issue in GitHub
-
Link the article that is to be improved and specify the branch
-
Assign the Issue to the reviewer/copy-editor.
Working with a reviewer in GitHub:
-
Important: Make sure to look for reviewer/editor comments in the content, they will usually be something like
(COMMENT: comment goes here)
and make sure to delete them before the article goes live (after applying any necessary changes, of course). -
If there are only minor issues (typos, commas, etc.) the reviewer will directly commit to the specified branch (denoted in the Issue or the compare branch in the Pull Request). Who will merge this branch is to be determined in the Pull Request but it is usually the writer.
-
If there are many issues (e.g., with the Style Guide adherence, sentences/paragraphs not making sense, etc.), the reviewer/editor may not fix them, but leave a comment for the writer to fix them.
-
If work is done directly in the master/vNext branch (e.g., a reviewer is working on an Issue), the reviewer will create a new branch stemming from the specified branch, apply changes/suggestions/comments there and open a Pull Request where the standard workflow applies.
-
Team members must monitor the Pull Requests section and quickly deal with new ones.
-
The Issue is to be closed after the Pull Request is merged.
-
- Home
- Getting Started
- Deploying Documentation on IIS
- Git and GitHub Workflow
- Handling Redirects (link to the docs-seed wiki)
- Markdown Syntax (link to the docs-seed wiki)
- Markdown Nesting (link to the docs-seed wiki)
- Using Templates (link to the docs-seed wiki)
- Using Git and Git Bash
- Faster Jekyll Build via generate_exclude.rb Script
- Using Helper Tools
- Troubleshooting
- Use VS Diff tool with Git and SourceTree