essentially like cloning on github's servers - but that's inconsequential, mostly.. also: forks are not automatically up to date (relative to repo you forked)! your fork creates a snapshot of the original repo at the time you fork it.
fork on github
creates a clone on github servers
copy url of that clone
git clone [url]
- clones the content of your fork to your local machine
git remote add upstream firstname.lastname@example.org:flatiron-school/003-ruby-lectures[or whatever the repo url is]
- adds remote repo to your local
git fetch upstream
- adds new changes from original repo to your local machine.
git merge upstream/master
- (while in local master, assuming there have been changes on the original)
git push origin master
- pushes to your github fork, not original repo
submit pull request to original repo when you'd like to attempt to get your work integrated into original repo
diff to comapre changes between local and upstream:
git diff upstream/master master | subl
upstream/masteris the remote (original),
masteris your local master branch and
| sublsends the result to a sublime file instead of to the terminal output.
- reverse the order of
masterto see the diff from the "opposite point of view", so to speak. Meaning, adds will look like removes and vice-versa [I haven't yet figured out the better way to approach this]
git diffcan also be used with your own remote repo (