Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Git 101
Dimitris Tsironis
May 24, 2013
Technology
0
190
Git 101
A introductor presentation for Free Friday meetups at Technological Education Institute of Piraeus
Dimitris Tsironis
May 24, 2013
Tweet
Share
More Decks by Dimitris Tsironis
See All by Dimitris Tsironis
How to Develop Backbone Plugins (...for the greater good!)
tsironis
0
140
Modern Webapps
tsironis
1
83
Automating your workflow with Grunt
tsironis
2
170
Git 201
tsironis
0
140
Capistrano for non-Rubyists
tsironis
4
91
HTML+CSS: how to get started
tsironis
1
61
Coffeescript: unfancy javascript
tsironis
2
360
Coffescript - take a sip of code
tsironis
4
150
Startup Weekend Next Presentation
tsironis
2
150
Other Decks in Technology
See All in Technology
データ分析で切り拓け! エンジニアとしてのデータ分析職キャリア戦略
ksnt
0
180
The Fractal Geometry of Software Design
vladikk
1
1.3k
【toranoana.deno#7】Denoからwasmを呼び出す基礎
toranoana
0
130
さいきんのRaspberry Pi。 / osc22do-rpi
akkiesoft
6
5.3k
ドメイン知識の蓄積が開発に起こす100のこと
codmoninc
0
110
Accelerated Computing for NLP on AWS
shokout
1
260
雑な攻撃からELBを守る一工夫 +おまけ / Know-how to protect servers from miscellaneous attacks
hiroga
0
720
Data in Google I/O - IO Extended GDG Seoul
kennethanceyer
0
160
SlackBotで あらゆる業務を自動化。問い合わせ〜DevOpsまで #CODT2022
kogatakanori
0
1k
MoT TechTalk #12 タクシーアプリ『GO』大規模トラフィックを捌く分析データ基盤の全容に迫る!
mot_techtalk
1
410
Inside out - abusing archive file formats
ange
3
390
2024卒_freee_エンジニア職(ポテンシャル採用)_説明資料
freee
0
330
Featured
See All Featured
Fireside Chat
paigeccino
12
1.3k
Stop Working from a Prison Cell
hatefulcrawdad
261
17k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
226
15k
BBQ
matthewcrist
74
7.9k
How GitHub (no longer) Works
holman
296
140k
What the flash - Photography Introduction
edds
62
10k
Building Better People: How to give real-time feedback that sticks.
wjessup
344
17k
A Tale of Four Properties
chriscoyier
149
21k
Web development in the modern age
philhawksworth
197
9.3k
Optimizing for Happiness
mojombo
365
63k
Documentation Writing (for coders)
carmenhchung
48
2.6k
For a Future-Friendly Web
brad_frost
166
7.4k
Transcript
Git 101 FreeFriday @ Teipir
Real quick...
Free Fridays Discuss about technology and stuff Learn new things
and stay up-to-date Get better at what we do Enrich our education
Dimitris Tsironis Front-end Engineer at BugSense, JavaScript lover || hater,
Open-source & (Coffee)Script addict, Technology afficcionado
Source Control Management Keep your code organized in repositories Enhance
contributing Source versioning
Git Distributed Version Control System (DVCS)
Git Created by Linus Torvalds [2005] Written (mostly) in C
and Shell
Why distributed? Every developer gets a copy of the repo
Make your contributions really fast Work offline
Git installation sudo apt-get install git [Ubuntu] brew install git
[OSX] http://bit.ly/14Gqzyp [Windows]
Creating a repository $ mkdir -p ~/gitff/lecture1 $ cd ~/gitff/lecture1
$ git init
Now your folder is a git repository
Start coding! or whatever
Write some code Create a text file (touch readme.txt) Add
your name inside the file
Cool story bro! but how can I update my repo?
Commit A set of changes
The staging area All the modified/added/deleted files that are going
to be commited
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)
Add readme to stage git add readme.txt This command adds
readme.txt (or changes in readme.txt) to staging area
Alternative adding all files to stage git add --all This
command adds (add) all (deleted/ created/modified) files to staging area
git status # On branch master # # Initial commit
# # Changes to be committed: # (use "git rm --cached <file>..." to unstage) # # new file: readme.txt #
Commit changes git commit -m “Initial Commit” This command creates
the commit containing the staged changes
Now add your email to readme.txt
How can I get my code to the web?
Github (Hosted) Bitbucket (Hosted) GitLab (Private) And may others
Github a web-based hosting service for software development projects that
use Git Written in Ruby on Rails and Erlang Running since 2008
Creating a new Github Repository
None
None
The remote (origin) The git path to remote repository (usually
called origin)
Add remote to local repository git remote add origin your_remote
This command adds a remote to a remote repository
git remote -v Show my remotes
Push pushing commits to remote repository
Push changes to remote repository git push origin master We
will only use master branch for the time being
Pull pulling commits from remote repository
Pull changes from remote repository git pull origin master We
will only use master branch for the time being
Clone Get a copy of a repository
Cloning a repository $ cd $ git clone https://github.com/FreeFriday/ my_first_repo.git
angels_first_repo $ cd angels_first_repo $ ls -l
Thanks! @tsironakos