Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to Git

Introduction to Git

A short introduction to Git, created with one of the Rails Girls events in mind.

It goes through the basic workflow:
1) Cloning the repository (git clone).
2) Working on files.
3) What's the situation? (git status)
4) What exactly have I done? (git diff)
5) I want to share these changes (git add)
6) Double-checking (git diff --cached)
7) Making a commit (git commit)
8) Sharing your changes (git push)

Avatar for Lukasz Wrobel

Lukasz Wrobel

May 25, 2014
Tweet

More Decks by Lukasz Wrobel

Other Decks in Programming

Transcript

  1. About me • Architect, team leader; • high-traffic websites: ◦

    nk.pl; ◦ Gadu-Gadu. • “Memoirs of a Software Team Leader”; • @lukaszwrobel
  2. 3. What’s the situation? » git status # On branch

    master # Changes not staged for commit: # (use "git add <file>..." to update what # will be committed) # (use "git checkout -- <file>..." to # discard changes in working directory) # # modified: README.md # no changes added to commit (use "git add" and/or "git commit -a")
  3. 4. What exactly have I done? » git diff +Some

    important info belongs here. +
  4. 7. Making a commit » git commit -m 'README extended

    with some vital information' [master 2964374] README extended with some vital information 1 file changed, 2 insertions(+)