git & github

git & github

An introduction to git and GitHub.

4d50219c18ed1ee77e25a8fb83605c6f?s=128

Trevor Strieber

October 14, 2013
Tweet

Transcript

  1. git & github trevor strieber

  2. who am i? ARMSTRONG GRADUATE SOFTWARE DEVELOPER ATLANTIC TELE-NETWORK @

  3. what is git?

  4. source code management git is a SYSTEM

  5. git keeps track of changes IN YOUR CODE

  6. git works

  7. git makes it easier to work AS A TEAM

  8. None
  9. what is

  10. None
  11. github is a place to store your CODE

  12. github IS

  13. github IS DISTRIBUTION

  14. github IS DISTRIBUTION

  15. github is a

  16. github is a social network

  17. github is a social network for NERDS

  18. github is a social network for NERDS

  19. github is a social network for DEVELOPERS

  20. HOW DOES IT

  21. installation WINDOWS MSYSGIT http://msysgit.github.io/

  22. installation OSX GIT already installed

  23. installation OSX WANT NEWER GIT? check out homebrew http://brew.sh/

  24. installation LINUX USE YOUR package manager

  25. installation LINUX Ubuntu / Mint apt-get

  26. installation LINUX CentOS / Fedora yum

  27. CREATING A REPOSITORY

  28. git init [trevor:~/sweet_app]$ git init Initialized empty Git repository in

    /home/trevor/sweet_app/.git/
  29. NOW WHAT?

  30. NOW WHAT?

  31. edit files [trevor:~/sweet_app]$ vim hello_world.rb

  32. [trevor:~/sweet_app]$ git status # On branch master # # Initial

    commit # # Untracked files: # (use “git add <file>…” to include in what will be committed) # # hello_world.rb git status
  33. TRACKING new files

  34. [trevor:~/sweet_app]$ git add hello_world.rb git add

  35. HOW ARE WE looking?

  36. [trevor:~/sweet_app]$ git status # On branch master # # Initial

    commit # # Changes to be committed: # (use “git rm --cached <file>…” to unstage # # new file: hello_world.rb git status
  37. WHAT IS A commit?

  38. COMMIT: a snapshot of your code

  39. [trevor:~/sweet_app]$ git commit –m ‘Initial commit!’ [master (root-commit) f888f95 Initial

    commit! 1 files changed, 2 insertions(+), 0 deletions(-) create mode 100644 hello_world.rb git commit
  40. CLEAN: no unsaved changes

  41. [trevor:~/sweet_app]$ git status # On branch master Nothing to commit

    (working directory clean) git status
  42. SHARING

  43. GitHub

  44. create a repository

  45. pick a name get the URL

  46. connect the repositories

  47. [trevor:~/sweet_app]$ git remote add origin \ https://github.com/TrevorS/sweet_app.git git remote

  48. upload your changes

  49. [trevor:~/sweet_app]$ git push –u origin master Username for ‘https://github.com’: TrevorS

    Password for ‘https://TrevorS@github.com’: Counting objects 3, done. Writing objects: 100% (3/3), 258 bytes, done. Total 3 (delta 0), reused 0 (delta 0) To https://github.com/TrevorS/sweet_app.git * [new branch] master -> master Branch master set up to track remote branch master from origin. git push
  50. ADMIRE YOUR RESULTS

  51. these are the basics

  52. these are the basics LEARN MORE

  53. these are the basics LEARN MORE SHOW OFF