Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Maintenance
- To maintain and develop this project, follow the steps below.
- 1. Clone it as described in the Installment section
- * `git clone`
- * `git status`
- * Check that everything worked, that you are up to date, and that you are on the `master` branch
- 2. Create a new branch for your individual development.<br/>
- * The proper convention for branching is to make a new branch for any new feature, bug fix, or any other individual component added to the code base.<br/>
- * `git checkout -b <your branch name>`
- * Create a new branch that is exactly the same as the current branch you are on when you ran the command
- * Any changes made will not affect the original branch.
- * <b> This is very important when branching off of the master branch. We do not want to make changes directly to master. </b>
- * `git status`
- * Be sure that you are not on your new branch.
- * Now, you will be able to write as much code as you want, test it, save it, or delete it, and not affect the rest of the people on the project. <br/>
- 3. When you are ready to add something to your branch (code that definitely works and that you want to keep), you'll need to commit it.
- * `git status`
- * See a list of files that have been modified, but "`not staged for commit`"
- * `git add .`
- * Add all of the files in your <i>current directory</i> (`.`)
- * If you do <b>not</b> want all of these files, then add them individually:
- `git add <path/to/file>`<br/>
- * `git commit -m <your message>`
- * This will save all of your changes to the current branch that your on. Descriptive messages are good!
- 4. When you are ready, push commits to the remote repository.
- * `git push`
- * Enter login credentials if prompted.
- * Follow the recommended instructions if prompted for an upstream branch.<br/>
- 5. Before adding changes to the final product, check for conflicts.
- * `git status`
- * Make sure all of your changes have been committed.
- * If you have changes that you do not want to keep, simply run `git stash` to stash them away. Note: this is not technically the purpose of `stash.` However, it is good enough for our purposes.
- * If you want to apply these changes to the new branch for some reason, run `git stash pop`.
- 6. Update the local target branch (i.e. `master`).
- * `git checkout master`
- * Move to the target branch
- * `git pull`
- * Pull in any remote updates to the branch that weren't already there.
- * As long as you are not making any changes directly to master (which you should not be), then this should not result in any conflicts.
- * `git checkout <your branch>`
- * Check out your custom branch
- * `git merge master`
- * merge the target branch into your custom branch
- * This will merge `master` <i>into</i> `your branch`.<br/>
- 7. Resolve `Merge Conflicts` errors.
- * Locate the automatic markup in your code.
- * The section between `<<<< HEAD` and `=======` is the code you wrote. Anything between `=======` and `>>>>> master` is the code in the master branch.
- * Compare the two segments, and rework things until you have the right code.
- * Commit these changes, and finally push your branch to the remote repository.
- 8. Open a <i>pull request</i>.
- * Return to the GitHub web portal and click the `New pull request` button.
- * Select the `base` branch as master (or whatever branch you branched off), and `compare` as your branch.
- * If you have recently pushed a branch, then it will probably recommend that branch to create a pull request with.
- * Any conflicts should have been resolved in the previous step, but if there are more be careful to resolve them all and try again.
- * On the right side of the page, add a user (the repo owner is a good choice) as a `Reviewer`, then submit the request.
- * When the reviewer has checked it and verified that it is a good change, then it will be merged into the branch as a new commit.
- Congratulations! You have now successfuly contributed to the final product.
Add Comment
Please, Sign In to add comment