Table of Contents Getting the files for the first time...2 Making Changes, Commiting them and Pull Requests:...5 Update your repository from the upstream master...8 Making a new branch (for leads, do this each and every day before working)...10 Set the latest branch as the master (for leads, do this at the end of every day)...11 Accepting a Pull Request (for leads)...12 Things to figure out still...13
Getting the files for the first time Download github for windows http://windows.github.com/ Create an account and login Select tools->options and fill in your name and email address
Go to this repository on github.com https://github.com/pickle27/2809_test Click on the fork button and create a fork of the repository for yourself. These files will now be accessible from your github account.
Back in github for windows Under your github repositories click clone on the new repository you added, this will copy the files to your computer (you might need to click refresh for the repository to show up).
Making Changes, Commiting them and Pull Requests: Open the folder where the repo was cloned to and edit one of the cad files. Back in github for windows go to your repository and look at the uncommited changes. Enter a commit message that described which part you changed and what you did then click commit. Repository window, on the left is a list of what files have changes, if they are text it will show the difference otherwise it will simply list the file as changes. On the right in yellow is your commit message. All commit messages should clearly describe what the changes are so we can quickly and easily understand them. If your commit messages are poor your work will not be merged into the master working copy so make good commit messages Then press sync to sync your changes to github.
Now go to your github repository online and select pull request, this means you want the upstream owner to pull your changes into the main repo.
This is the pull request window. The top left drop downs display the branch and repository you are requesting to pull your changes into. On the right is your repository name and the branch you are requesting to have pulled. Below these drop downs is a summary of your request. You should name your request as well as providing a detailed description of all the changes. If you are on the CAD team you should add some screenshots of what you have changed to support your description. Take a second to review your commits are all of the commit messages clear? Also review the list of files that are changed if you do not have a description for what you changed in a file your request will be rejected.
Update your repository from the upstream master In github for windows Select tools -> open shell here and type these command one after another Type: git remote add upstream https://github.com/pickle27/2809_test (or the url of the repo) this only needs to be done the first time. Type: git fetch upstream (gets the new files but does not change any of your files) Type: git status and look at the output, it will print the current branch you are working on. The next step will override files in your local directory if you don t want this then create a new branch and make it active. If you don t care about the changes type git stash Type: git merge upstream/master your master branch is now the same as the upstream master branch Type: git push origin master Notes you can merge any 2 branches but for build season you should only need to merge the master with one of your own branches.
Result (yours may look a bit different but this gives you an idea of what print outs to expect) :
Making a new branch (for leads, do this each and every day before working) In github for windows select branch from the top and create a new branch (name it the date in this format DD_MM_YYYY). You are now using a new branch and new changes will only be present here Remember to make commits appropriately as you work
Set the latest branch as the master (for leads, do this at the end of every day) In github for windows commit all your changes to your current working branch Then from the branches menu select manage Drag the current branch into the first slot and master into the second and result slot then click merge Sync your changes to github
Accepting a Pull Request (for leads) When someone makes a pull request they are asking you to merge their changes into your repository. The pull request process is all done online via github. When someone makes a pull request to you you will recieve an email from github. When you get a pull request you need to review it before merging the changes. You should review: a) Look at all the files that have been changed, there should be a commit message detailing each change, if there is not reject the request b) Look at all the commit messages are they of good quality? If not reject the request c) Read the pull request description, is it of good quality? For CAD does it incude screen shots? If not reject the request. When you reject a request respond via github in the reply area about why the request was recjected. Then the person who made the request knows why and can fix their work before making another request. Screen shots to come.
Things to figure out still What is different when the repo is private can people request access on their own and we approve or do we have to invite?