Difference between revisions of "GIT for OOP344 Projects"
(→Command line or GUI Tools) |
(→Branch the master repository) |
||
Line 33: | Line 33: | ||
=Branch the master repository= | =Branch the master repository= | ||
#Each team member now branches the master repository under a relative name to the issue she/he is working on. | #Each team member now branches the master repository under a relative name to the issue she/he is working on. | ||
+ | #:<big><pre>git branch IssueNameOrID</pre></big> | ||
#switch your repository to the branch created | #switch your repository to the branch created | ||
+ | #:<big><pre>git checkout IssueNameOrID</pre></big> | ||
#push the branch back to github | #push the branch back to github | ||
+ | #:<big><pre>git push --set-upstream origin IssueNameOrID</pre></big> | ||
+ | =='''Very Important Note regarding working on anissues'''== | ||
+ | # Never work on the master branch. | ||
+ | # Always create a branch to do the work in. | ||
+ | # Constantly push the work back to github | ||
+ | #: (Like pressing the save button on an editor) | ||
+ | # when it is done, create a pull request for someone else to check the code and merge it back to the master branch | ||
+ | # when it is merged, then pull the changes to master | ||
+ | # pickup another issue and go the step one. | ||
+ | |||
=Work on the issue= | =Work on the issue= | ||
#start working on the issue committing the work regularly | #start working on the issue committing the work regularly |
Revision as of 13:47, 29 October 2012
OOP344 | Weekly Schedule | Student List | Teams | Project | Student Resources
UNDER CONSTRUCTION
This page is to give a brief guideline of how to use github for OOP344 or other school projects.
Contents
Command line or GUI Tools
Please use any of the Tools you are more comfortable to work with git. There are several GUI interfaces that may make working with git easier for you. here are few examples: (feel free to add more if you know of any):
- Git Jungle Linux
- Linux Gui Git
- Tortois Git (Windows)
- Git Windows Explorer plugin (windows)
- github for Mac (Mac)
- Smart Git (Windows, Mac, Linux)
- GitX (Mac)
- SourceTree (Mac)
Teams and their Repository
Logging to your github account you will notice that you are now member of a team that carries a similar name to your team name. Also you have full access to a repository with the same name.
Cloning the repository
The first step is to clone the repository since it contains the initial files to start the project.
git clone git@github.com:Seneca-OOP344/REPONAME.git
REPONAME is the name of the project repository on github
Assign the issues
- check the Issues on The CIO Framework page and assign each of them to two members, one for development and another for code review and pulling the code back to master repository
- list all the issues in your team page that is built based on the team page template.
- create the issues on github assigning them to the team members
- It is recommended to create a milestone and attach /assign it to the issue for follow up
Branch the master repository
- Each team member now branches the master repository under a relative name to the issue she/he is working on.
git branch IssueNameOrID
- switch your repository to the branch created
git checkout IssueNameOrID
- push the branch back to github
git push --set-upstream origin IssueNameOrID
Very Important Note regarding working on anissues
- Never work on the master branch.
- Always create a branch to do the work in.
- Constantly push the work back to github
- (Like pressing the save button on an editor)
- when it is done, create a pull request for someone else to check the code and merge it back to the master branch
- when it is merged, then pull the changes to master
- pickup another issue and go the step one.
Work on the issue
- start working on the issue committing the work regularly
- push the changes to the branch on github to share, discuss your code and problems with your professor and team members
Pull request
- push final changes to github
- when task is completed create a pull request to merge back the branch to the master repository.
- assign the pull request to the team member responsible for code review
Review the code
- check out the code and make sure it is proper and working to your best knowledge.
- share your concerns with your team-mates through the discussion board of attached to the issue/pull request
Merge the code back to master repository
- when ready, merge the branch back to the master branch
- resolve possible conflicts
- test the master repository one last time
- close the pull request.