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

Introduction to git

sarva
March 26, 2014

Introduction to git

sarva

March 26, 2014
Tweet

More Decks by sarva

Other Decks in Programming

Transcript

  1. git

  2. What is git? • Version control system • Works well

    with text files - programs, LaTeX, beamer • Created by Linus
  3. git terminology • Repository = Collection of files + change

    history • commit = Action of changing repo state • clone = Making a copy of a repo • Remote repository = Repo in another location ◦ push = Push changes in local repo to a remote repo ◦ pull = Pull changes in a remote repo to a local repo • Merging = Reconciling conflicting changes
  4. Committing to a repository • Two step procedure ◦ git

    add <file-name> ◦ git commit • Demo Repository Unstaged changes Staging Area git add git commit
  5. Configuring user details • git config --global user.name “Name” •

    git config --global user.email “Email” • Demo
  6. Storing a repository on the cloud • Create a repo

    on www.bitbucket.org • cd /path/to/my/local/repo • git remote add origin <bitbucket-repo> • git push -u origin --all