- Fork the main project https://github.com/OpenMRS-Australia/openmrs-cpm.git
- Clone your project to a directory (using GitHub client or command line below)
git clone http://github.com/yourUsername/openmrs-cpm.git
- Go into the newly cloned folder
cd openmrs-cpm
- Add the main project as a remote branch (convention typically calls it "upstream" as shown below)
git remote add upstream https://github.com/OpenMRS-Australia/openmrs-cpm.git
- Make your changes and commit them locally
- To add a new file
git add fileName
- To commit your changes
git commit -m "This is a commit message. Make it descriptive"
- To add a new file
- Push your local changes to your GitHub.com account
git push origin master
- To contribute back to the main project,
- Retrieve latest changes from the main project
git pull upstream master
- Resolve conflicts (if any)
- Commit changes
- Retrieve latest changes from the main project
- Go to your GitHub.com repot (http://github.com/yourUsername/openmrs-cpm.git) and to make a pull request
Useful Links
Interactive tutorial: https://try.github.io/
Cheat Sheet: https://training.github.com/kit/downloads/github-git-cheat-sheet.pdf