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

Git 101

Git 101

A introductor presentation for Free Friday meetups at Technological Education Institute of Piraeus

Dimitris Tsironis

May 24, 2013
Tweet

More Decks by Dimitris Tsironis

Other Decks in Technology

Transcript

  1. Free Fridays Discuss about technology and stuff Learn new things

    and stay up-to-date Get better at what we do Enrich our education
  2. Dimitris Tsironis Front-end Engineer at BugSense, JavaScript lover || hater,

    Open-source & (Coffee)Script addict, Technology afficcionado
  3. Why distributed? Every developer gets a copy of the repo

    Make your contributions really fast Work offline
  4. git status # On branch master # # Initial commit

    # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # readme.txt nothing added to commit but untracked files present (use "git add" to track)
  5. Add readme to stage git add readme.txt This command adds

    readme.txt (or changes in readme.txt) to staging area
  6. Alternative adding all files to stage git add --all This

    command adds (add) all (deleted/ created/modified) files to staging area
  7. git status # On branch master # # Initial commit

    # # Changes to be committed: # (use "git rm --cached <file>..." to unstage) # # new file: readme.txt #
  8. Github a web-based hosting service for software development projects that

    use Git Written in Ruby on Rails and Erlang Running since 2008
  9. Add remote to local repository git remote add origin your_remote

    This command adds a remote to a remote repository
  10. Push changes to remote repository git push origin master We

    will only use master branch for the time being
  11. Pull changes from remote repository git pull origin master We

    will only use master branch for the time being