Skip to content

Instantly share code, notes, and snippets.

@duyvk
Last active December 27, 2015 06:59
Show Gist options
  • Save duyvk/7285683 to your computer and use it in GitHub Desktop.
Save duyvk/7285683 to your computer and use it in GitHub Desktop.

Adding the original repository as a remote it is important so that you can "fetch" future lab sessions materials.

From the shell command line, enter your repository folder and follow these steps:

git remote add upstream https://github.com/cdparra/introsde2013.git

Now, the following two commands must be executed before each lab session

git fetch upstream
git merge upstream/master

Git merge download new files/changes in the original repo (without modifying your own) git merge apply these changes.

This workflow works best for me:

git checkout -b develop

...make some changes...

...notice master has been updated...

...commit changes to develop...

git checkout master

git pull

...bring those changes back into develop...

git checkout develop

git rebase master

...make some more changes...

...commit them to develop...

...merge them into master...

git checkout master

git pull

git merge develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment