Intro to Git

Pyladies Meetup February 24, 2015

While you wait...

  1. Install a text editor (Sublime)
  2. http://github.com
  3. create an account
  4. tell me your username
  5. install git

on a mac: http://sourceforge.net/projects/git-osx-installer/

on a pc: http://msysgit.github.io

Intro to Git

Pyladies Meetup February 24, 2015

Avery Anderson

@averycodes

http://averycodes.com

Software Engineer, Minerva Project

Tenets of Adult Learning

  • You should know why you are learning something.
  • The foundation of the learning activities should include experience.
  • You should plan and evaluate your own instruction.
  • The things you learn should directly impact your daily activities.
  • Learning should be oriented towards problems not content.
  • Your motivations should be your own, not external.

Follow Along

http://averycodes.com/blog/intro-to-git-pyladies/

Versioning

Git

versioning for programmers

Github

git repository hosting service

Version Control Vocab

Command Line Interface

git config --global user.email <email>

git config --global user.name <name>

git config --list

Activity: Configuring your identity

Open the command line tools, add your name and email

https://github.com/averymanderson/teaching-git

git clone <clone url>

Activity: Cloning a Repository

Navigate to github, copy the https clone url and clone the repository to your computer

git status

git add -p

git commit -m "<message>"

Activity: Committing a change

Add your name to pyladies.txt, make a commit with an informative commit message

Quick Discussion:

Local repository versus remote repository

git push

Quick Experimental Interlude

git pull

Activity: Pushing and Merge Conflicts

Push your changes to the server. Pull updates from the server. Resolve merge conflicts.

Push your changes to the server. Pull updates from the server. Resolve merge conflicts.

git diff

Move your name from one spot in the list to another. Do a git diff

Activity: Reading the diff

git branch <branchname>

git checkout <branchname>

git merge <branchname>

Activity: Branching and merging

Branch off from master. Add some people to the list who should be pyladies. Merge your branch back into master

Quick Discussion:

Why would you branch?

GUI Tools!

Learn more git

https://try.github.io/

Git for Pyladies

By Avery A.

Git for Pyladies

Version control. Git. Do these words scare you? Are they completely foreign? Well not for long! Being able to use git will singlehandedly save you days of frustration as well as allowing you to get the help you need and showcase work you are proud of. During this meetup we’ll transform git from a foreign concept to a powerful tool. Make sure to bring your laptop!

  • 1,695