$30 off During Our Annual Pro Sale. View Details »

Introduction to Git (revisited)

Introduction to Git (revisited)

An introduction to git (with links to tutorials) for Rails Girls Linz 2014

alicetragedy

June 14, 2014
Tweet

More Decks by alicetragedy

Other Decks in Programming

Transcript

  1. Introduction to git

    View Slide

  2. "In software development, Git /ɡɪt/ is a distributed
    revision control and source code management
    (SCM) system with an emphasis on speed. Git was
    initially designed and developed by Linus Torvalds
    for Linux kernel development in 2005. Every Git
    working directory is a full-fledged repository with
    complete history and full version tracking
    capabilities, not dependent on network access or a
    central server."
    - Wikipedia

    View Slide

  3. Say what?

    View Slide

  4. Git is a tool that will help
    you track down changes in
    your work and your code.

    View Slide

  5. (Git is basically the slightly annoying girlfriend/boyfriend that will
    constantly take pictures of you: while you're eating, while you're
    walking, while you're sleeping; tracking down your every move. At
    first it's a little difficult to get used to it, but the day you really need
    to know what you were wearing at your third cousin's best friend's
    brother's 17th birthday party, those photos will come in handy.)

    View Slide

  6. Some basic concepts

    View Slide

  7. git works with source code

    View Slide

  8. git tracks changes

    View Slide

  9. git helps collaboration

    View Slide

  10. git works in a non-linear way,
    and there are different ways
    to use that to your
    advantage

    View Slide

  11. Understand the lingo

    View Slide

  12. repository
    !
    the "folder" inside your
    project where all the
    changes will be

    View Slide

  13. commit
    !
    a way to "save your changes"

    View Slide

  14. a little like a tree, you have the
    main trunk (master branch)
    and the feature branches, so
    you can work on separate
    things simultaneously

    View Slide

  15. Follow these steps

    View Slide

  16. install git
    !
    http://git-scm.com/

    View Slide

  17. initiate a repository for the
    project you want to track
    !
    (git init)

    View Slide

  18. stage the files you have
    made changes to
    !
    (git add)

    View Slide

  19. comment and commit your
    changes to the files you
    have added
    !
    (git commit -m)

    View Slide

  20. check the status of your
    changes
    !
    (git status)

    View Slide

  21. Usually, you run these
    commands from the
    terminal. There are also
    GUIs (Graphic User
    Interfaces) available, though

    View Slide

  22. Practice makes perfect

    View Slide

  23. Try Git
    mini-tutorial, all online
    !
    https://try.github.io

    View Slide

  24. Git-it
    (learn git & GitHub in your
    terminal)
    https://github.com/jlord/
    git-it

    View Slide

  25. Have fun!
    !
    &say hello on twitter or
    github:
    @alicetragedy

    View Slide