git clone [email protected]:[your_github_acct]/calcentral.git
To keep track of original repository, add a remote named ets. (This is a one time operation.)
git remote add ets https://github.com/ets-berkeley-edu/calcentral.git
To sync changes from remote ets repository to your forked repository run the following code. Follow this step every time you want to update your forked repository with changes in the original repository.
git fetch ets
# Fetches any new changes from the original repository
git merge ets/master
# Merges any changes fetched into your working files
For more information on configuring remotes and updating forked repository check this link.
To create a new GitHub branch
git checkout -b CLC-XXXX ets/master
# The new branch name should be of the format CLC-XXXX where XXXX is the Jira Issue ID.
git add .
# git add . adds all the files with changes.
# Individual files can also added using the command git add <filename>
git commit -m "[CLC-XXXX] - commit message"
git push origin CLC-XXXX
After pushing the changes, a pull request can be created from the forked repository in github.
- Log in to GitHub account and click on the "Compare and Review" button.
- Review the changes made.
- Click "Send Pull Request".
If you need more help on creating pull requests, feel free to read the creating pull requests post on GitHub.
To make changes to a pull request.
- Checkout the same branch in which the changes were previously made.
- Make new changes and run the following commands.
git add <filename>
# Or git add . to add all the files with changes
git commit --amend
git push -f origin <branch name>
# Note: Use -f for changes to be pushed when updating a PR
Front-end linting (checking for errors / code styles)
jshint .
jscs .
Back-end testing can be done by running the following command.
rspec spec