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

Git 101

Git 101

Git and GitHub for beginners.

Avatar for Celestine Omin

Celestine Omin

November 22, 2015
Tweet

More Decks by Celestine Omin

Other Decks in Technology

Transcript

  1. INSTALL GIT • Linux(Debian) - sudo apt-get install git •

    Linux(Fedora) - sudo yum install git • Mac & Windows - http://git-scm.com/download
  2. WHY SHOULD I CARE? WHAT IS GIT? • A system

    that holds record of changes you have made • It keeps track of who did what • It offers you a simple way to rollback your changes - Ctrl + Z on steroids. • At its core, Git is a distributed version control system.
  3. ADDING CHANGES git add . - Add all the file

    in a directory git add index.html - Add a single file (index.html)
  4. COMMITTING YOUR CHANGES git commit -m “Initial commit” - Commit

    this initial file. This typically precedes git add . git commit -am “Changed home page” - You can use this immediately after modifying a file. It combines git add . and git commit -m
  5. GIT LOG git log commit 75d41c8c0cddb0381a62173a78b7a167aaf6012f Author: Celestine Omin<[email protected]> Date:

    Mon Oct 19 14:07:20 2015 +0200 SOA-401: Configure REDIS DB selection. - Added configurables to change where Hermes places REDIS cache.
  6. PREPARING TO PUSH TO GITHUB git remote set-url origin [email protected]:cyberomin/uyo.git

    Set the destination for your project/code git push -u origin master
 Push to the master branch