This wiki contains instructions for accessing the CosmoQuest github repositories.
The two primary repositories are cosmoquest and cosmoquest-wordpress. Both are currently only viewable via CosmoQuestTeam Github members.
All repositories have both a master and develop branch.
The develop branch is used as a staging area for the project. Development of new code, both new features and long term bug fixes, should be placed in the develop branch. When code in the develop branch is considered ready to be on the live server, a pull request must be created so that the changes can be viewed and discussed with all development team members. For more information on creating pull requests on Github, please check the Github Documentation.
The master branch contains code that is running on the live site. Code must be considered stable and ready for production before it is pulled into the master branch.
In the event that live fixes are necessary, they are to be places in the livefixes branch. This branch comes from the master branch directly. In order to effectively use the livefixes branch we must follow the following procedure.
- If the livefixes branch does not already exist, create a new branch off of the master branch. Otherwise, checkout the livefixes branch and pull the latest version of master onto it.
- Push the changes from 1 onto Github (the origin/livefixes branch).
- Make any changes that are necessary and commit them.
- When all changes are made, push them to the livefixes branch.
- Issue a pull request to add the fixes to the master branch.
- If the changes are approved for the master branch, switch to the develop branch and pull the changes from livefixes onto it.
- Ensure all members of the development team are aware of the live fixes so that they can be incorporated into permanent changes.
If team members are currently on the master branch then they should immediately switch to the develop branch. The process of switching to the develop branch is different depending on the software configuration of the development environment. Below is a list of examples to help team members switch to the develop branch.
- With the repository open, click on VCS in the menubar. Then go down to Git, and click on Fetch.

- Next, click on VCS in the menubar again and then go down to git and select Branches.

- From this window select origin/develop and in the second pop-up window select checkout new local branch.

- To confirm what branch you are currently on, use the Git notification in the bottom right of the task bar. The branch name is displayed as Git: branchname as well as being displayed when hovered over.

The system shell (usually Bash on Linux or TCSH on MacOS) as well as the Git Shell (Windows) can be used to manage git repositories manually.
- From within the repository directory (in my case /home/ryan/cosmoquest) use the git fetch command to update your local repositories list of branches.

- To confirm what branch you are currently on, use the git branch command. It will display the branch you have checked out in green with a * in front of the name. In the image bellow, only the master branch has been checked out locally.

- In order to be on the develop branch, you must checkout the remote origin/develop branch as a new local branch. To do so with git ≥ 1.6.6, use the git checkout command.

- Finally, confirm you are on the develop branch by using the git branch command. The develop branch should be green and have a * in front of the name.
