Git: upgrade yourself

Romain Pellerin @romainpellerin

HumanTalks Compiègne 2015-04-14

Versioning & Branching

  1. Keep every change made to files
  2. Create releases
  3. Develop new features while fixing bugs on a production release

Versioning

Decentralized & Collaborative

Decentralized

Undo

Undo

First steps #1

 Install Git (on a Debian-based OS)

$ sudo aptitude update
$ sudo aptitude install git

First steps #2

 Create an empty repository

$ mkdir project && cd project
$ git init # Create local repository
# Add a remote repository called 'origin'
$ git remote add origin git@github.com:john/project.git

 OR Clone one existing

# Clone a remote repository to a new local one
$ git clone git@github.com:john/project.git project
# Remote repo 'origin' is automatically created,
# pointing to this URL

Fundamentals

Thunar

All you need is love Git

Schema

Common commands

Pushing code to a remote repo

$ git status
$ git add -A # Add all the workspace to the index
$ git commit -m "Here are some commits, fellows"
$ git push origin master # Push 'master' branch to 'origin' 

Pulling code from a remote repo

$ git pull origin master # Fetch and merge 'origin'
$ git log # Check what has been done

Go further

Go further

Tools

Basic workflow

Workflow

Successful workflow

Workflow

Keep control

CLIvsGUI

RTFM

http://git-scm.com/
https://try.github.io/

Thanks




http://romainpellerin.eu







Image credit : Vincent Driessen & Oliver Steele