View on GitHub

Pyladies-git-presentation

PyLadies Berlin meetup, Feb 2016

Download this project as a .zip file Download this project as a tar.gz file

Who we are

What is git?

Collaboration platforms

https://github.com/
https://github.com/explore
https://github.com/integrations
https://git-lfs.github.com/ - large repos

https://bitbucket.org - more private repos for free

Installing Git

Step: Install Git

Windows: It's recommended to download GitHub for Windows, which includes Git and has an easier install: windows.github.com. Use the Git Shell for your terminal.
Mac: You can also download GitHub for Mac, which includes Git, mac.github.com (from Preferences, select the command line tools install), or download Git by itself at: git-scm.com/downloads and follow the installation instructions.
Linux: Debian-based Distribution $ sudo apt-get install git-all
Linux: Febora-based Distribution $ sudo yum install git-all

Configure Git

git config --global user.name "John Doe"

git config --global user.email johndoe@example.com

Checking your settings

git config --list

git config user.name

Let the game begin

Create a new directory
Create a local repository
Create a new file
Add the file to the staging area

Git states & sections

modified - working directory
staged - staging area
- git add
committed - .git directory
- git commit

http://www.git-scm.com/book/en/v2/Getting-Started-Git-Basics#The-Three-States

Let the game begin

Check the status of the files
Commit the files
Check the history
Create a new branch and checkout the branch
We need to fix a bug in master
Let’s merge our master with the bug fix into feature branch and test our feature with the new changes.

Sharing our work

Alternative to github, more private repos for free

GitHub

Upload the repository to GitHub

You want to work on an existing project?

Useful links

Git documentation:
http://www.git-scm.com/

short guides:
https://try.github.io//levels/1/challenges/1
https://guides.github.com/

tools for learning about branching:
http://pcottle.github.io/learnGitBranching/
http://onlywei.github.io/explain-git-with-d3/#branch

Repos history visualization

helpful commands (cheat sheet):
https://training.github.com/kit/downloads/github-git-cheat-sheet.pdf