Guest User

Untitled

a guest
Aug 17th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.18 KB | None | 0 0
  1. ## Maintenance
  2. To maintain and develop this project, follow the steps below.
  3. 1. Clone it as described in the Installment section
  4. * `git clone`
  5. * `git status`
  6. * Check that everything worked, that you are up to date, and that you are on the `master` branch
  7.  
  8. 2. Create a new branch for your individual development.<br/>
  9. * 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/>
  10. * `git checkout -b <your branch name>`
  11. * Create a new branch that is exactly the same as the current branch you are on when you ran the command
  12. * Any changes made will not affect the original branch.
  13. * <b> This is very important when branching off of the master branch. We do not want to make changes directly to master. </b>
  14. * `git status`
  15. * Be sure that you are not on your new branch.
  16. * 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/>
  17. 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.
  18. * `git status`
  19. * See a list of files that have been modified, but "`not staged for commit`"
  20. * `git add .`
  21. * Add all of the files in your <i>current directory</i> (`.`)
  22. * If you do <b>not</b> want all of these files, then add them individually:
  23. `git add <path/to/file>`<br/>
  24. * `git commit -m <your message>`
  25. * This will save all of your changes to the current branch that your on. Descriptive messages are good!
  26. 4. When you are ready, push commits to the remote repository.
  27. * `git push`
  28. * Enter login credentials if prompted.
  29. * Follow the recommended instructions if prompted for an upstream branch.<br/>
  30. 5. Before adding changes to the final product, check for conflicts.
  31. * `git status`
  32. * Make sure all of your changes have been committed.
  33. * 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.
  34. * If you want to apply these changes to the new branch for some reason, run `git stash pop`.
  35. 6. Update the local target branch (i.e. `master`).
  36. * `git checkout master`
  37. * Move to the target branch
  38. * `git pull`
  39. * Pull in any remote updates to the branch that weren't already there.
  40. * 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.
  41. * `git checkout <your branch>`
  42. * Check out your custom branch
  43. * `git merge master`
  44. * merge the target branch into your custom branch
  45. * This will merge `master` <i>into</i> `your branch`.<br/>
  46. 7. Resolve `Merge Conflicts` errors.
  47. * Locate the automatic markup in your code.
  48. * The section between `<<<< HEAD` and `=======` is the code you wrote. Anything between `=======` and `>>>>> master` is the code in the master branch.
  49. * Compare the two segments, and rework things until you have the right code.
  50. * Commit these changes, and finally push your branch to the remote repository.
  51. 8. Open a <i>pull request</i>.
  52. * Return to the GitHub web portal and click the `New pull request` button.
  53. * Select the `base` branch as master (or whatever branch you branched off), and `compare` as your branch.
  54. * If you have recently pushed a branch, then it will probably recommend that branch to create a pull request with.
  55. * Any conflicts should have been resolved in the previous step, but if there are more be careful to resolve them all and try again.
  56. * On the right side of the page, add a user (the repo owner is a good choice) as a `Reviewer`, then submit the request.
  57. * 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.
  58.  
  59. Congratulations! You have now successfuly contributed to the final product.
Add Comment
Please, Sign In to add comment