Intro to Git and Github

Welcome!

Girl Develop It is here to provide affordable and accessible programs to learn software through mentorship and hands-on instruction.

Some "rules"

  • We are here for you!
  • Every question is important
  • Help each other
  • Have fun

Welcome!

Tell us about yourself.

  • Who are you?
  • What do you hope to get out of the class?
  • Who was your favorite character as a child?

What we will cover today

  • What is version control and why should we care?
  • Basics of git -- the essential commands
  • "Gitting" social with GitHub
  • Making puns about git

Forking

  • There are MILLIONS of public repositories on GitHub
  • If you want to use or contribute to a repository, you can fork it.

Forking

How to fork a repository. Image from https://help.github.com/articles/fork-a-repo

Forking

Cloning

Clone to get a local repository of your fork


cd ../

git clone https://github.com/username/FORKED-REPO-NAME.git

cd FORKED-REPO-NAME

git remote add upstream https://github.com/original-username/FORKED-REPO-NAME.git
# Assigns the original repository to a remote called "upstream"

git fetch upstream
# Pulls in changes not present in your local repository, without modifying your files
            

Pull Requests

  • After you fork and clone a repository all pushed changes will go to your fork
  • These changes will not affect the original repository
  • If you would like to get your changes to be incorporated into the original repo, you can submit a pull request

Starting a pull request

How to initiate a pull request. Image from https://help.github.com/articles/using-pull-requests

Previewing and sending pull request

How to preview and send a pull request. Image from https://help.github.com/articles/using-pull-requests

Managing pull requests

How to manage pull requests is out of the scope of this short workshop, but you can learn more from the Github Collaborating Tutorials

Questions?

?