Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up
for free
git & github
Trevor Strieber
October 14, 2013
Programming
10
540
git & github
An introduction to git and GitHub.
Trevor Strieber
October 14, 2013
Tweet
Share
More Decks by Trevor Strieber
See All by Trevor Strieber
trevors
3
120
Other Decks in Programming
See All in Programming
kubode
2
190
dqneo
0
140
gtongy
0
460
palkan
2
340
borkdude
1
180
manfredsteyer
PRO
0
160
n1215
1
470
bkuhlmann
6
710
o0h
PRO
0
320
hr01
1
4.3k
ajstarks
2
760
samjulien
0
310
Featured
See All Featured
smashingmag
232
18k
mza
80
4.2k
lynnandtonic
272
16k
erikaheidi
14
4.5k
paulrobertlloyd
71
3.7k
roundedbygravity
242
21k
ddemaree
273
31k
swwweet
206
6.9k
chrislema
231
16k
lauravandoore
11
1.7k
bryan
32
3.5k
rasmusluckow
318
19k
Transcript
git & github trevor strieber
who am i? ARMSTRONG GRADUATE SOFTWARE DEVELOPER ATLANTIC TELE-NETWORK @
what is git?
source code management git is a SYSTEM
git keeps track of changes IN YOUR CODE
git works
git makes it easier to work AS A TEAM
None
what is
None
github is a place to store your CODE
github IS
github IS DISTRIBUTION
github IS DISTRIBUTION
github is a
github is a social network
github is a social network for NERDS
github is a social network for NERDS
github is a social network for DEVELOPERS
HOW DOES IT
installation WINDOWS MSYSGIT http://msysgit.github.io/
installation OSX GIT already installed
installation OSX WANT NEWER GIT? check out homebrew http://brew.sh/
installation LINUX USE YOUR package manager
installation LINUX Ubuntu / Mint apt-get
installation LINUX CentOS / Fedora yum
CREATING A REPOSITORY
git init [trevor:~/sweet_app]$ git init Initialized empty Git repository in
/home/trevor/sweet_app/.git/
NOW WHAT?
NOW WHAT?
edit files [trevor:~/sweet_app]$ vim hello_world.rb
[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
TRACKING new files
[trevor:~/sweet_app]$ git add hello_world.rb git add
HOW ARE WE looking?
[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
WHAT IS A commit?
COMMIT: a snapshot of your code
[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
CLEAN: no unsaved changes
[trevor:~/sweet_app]$ git status # On branch master Nothing to commit
(working directory clean) git status
SHARING
GitHub
create a repository
pick a name get the URL
connect the repositories
[trevor:~/sweet_app]$ git remote add origin \ https://github.com/TrevorS/sweet_app.git git remote
upload your changes
[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
ADMIRE YOUR RESULTS
these are the basics
these are the basics LEARN MORE
these are the basics LEARN MORE SHOW OFF