Nice online reference at https://www.atlassian.com/git/
PDF presentation
from Meredith/Demitri Muna
To start a project:
- Create a directory for your project and some files in it
- Start a git repository: git init
- Add the files: git add
- Commite the files: git commit
- Create github account (https://github.com)
- In your project, associate remote origin with your project:
git remote add origin {repository-address}/{project}.git
- Push the current committed version of your project: git push origin master
Note: an alternate way to set up a new project with remote association is
to create the repository on github, then clone it locally, at which point a
new local repository will be set up with the remote already associated.
- Log into your github account
- On the desired project page on github, use the Fork button. This
will create a version of the project in your repository
- Clone this version to your computer to work on it: git clone {yourrepository-address}/{project}.git
- Declare a remote that will be synced with the fork: git remote add upstream https://github.com/{original_owner}/{project}.git
- Periodically update with:
- git fetch upstream
- git checkout master
- git merge upstream/master
- In the cloned/forked repository, work in a new branch: git branch {branchname}
- Add, commit and push your modifications
- On your github page, select the branch that you have been working in, and submit a Pull Request
Jon Holtzman
2015-09-02