Skip to content

Instantly share code, notes, and snippets.

@abenrob
Last active May 11, 2016 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abenrob/b7094aed2a08e34a60abada3637625c5 to your computer and use it in GitHub Desktop.
Save abenrob/b7094aed2a08e34a60abada3637625c5 to your computer and use it in GitHub Desktop.

MissingMaps Really Rough Git Primer

create local copy of your GitHub fork

git clone https://github.com/<username>/missingmaps.github.io.git

change directory to newly cloned fork

cd missingmaps.github.io

see what branches you have (and which one you are currently on)

git branch

create a new branch based on the branch you are currently on

git checkout -b <newbranchname>

make your changes to files, add new files, etc.

add any new files to git (so git knows to track them)

git add -A

commit your changes

git commit -am "your commit message"

push your branch to GitHub (creates your new branch on GitHub)

git push origin <newbranchname>

switch to the publish branch (on any other branch)

git checkout <branchname> so: git checkout publish

get publish branch up-to-date with GitHub version (or any other branch)

git pull origin <branchname> so: git pull origin publish

if your GitHub version of publish is not up-to-date with the core MissingMaps repo, you can either add upstrem references (not shown here) or do a Pull Request (on GitHub between the main repo publish branch and your publish branch

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