Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
GIT: what else?
Search
Alexandru Simonescu
January 29, 2016
Programming
1
100
GIT: what else?
Basic talk to GIT concepts and workflows.
Alexandru Simonescu
January 29, 2016
Tweet
Share
More Decks by Alexandru Simonescu
See All by Alexandru Simonescu
Software Architecture Journey
alxsimo
4
780
Serverless mobile applications with Firebase v2
alxsimo
4
250
Serverless mobile applications with Firebase
alxsimo
5
300
!Smelly code - The origins
alxsimo
0
87
Cleaner code with Guava v2
alxsimo
5
510
Cleaner code with Guava
alxsimo
3
140
Low fat backends for mobile guys
alxsimo
0
95
Other Decks in Programming
See All in Programming
ゆるやかにgolangci-lintのルールを強くする / Kyoto.go #56
utgwkk
2
400
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
850
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
3
480
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
270
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
270
Beyond ORM
77web
7
960
Haze - Real time background blurring
chrisbanes
1
520
フロントエンドのディレクトリ構成どうしてる? Feature-Sliced Design 導入体験談
osakatechlab
8
4.1k
テストコード書いてみませんか?
onopon
2
140
責務を分離するための例外設計 - PHPカンファレンス 2024
kajitack
6
1.5k
コンテナをたくさん詰め込んだシステムとランタイムの変化
makihiro
1
140
rails stats で紐解く ANDPAD のイマを支える技術たち
andpad
1
290
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.3k
Practical Orchestrator
shlominoach
186
10k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Scaling GitHub
holman
458
140k
KATA
mclloyd
29
14k
Building Applications with DynamoDB
mza
91
6.1k
Become a Pro
speakerdeck
PRO
26
5k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Being A Developer After 40
akosma
87
590k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
Transcript
GIT
Alexandru Simonescu http://alexsimo.com @alexsimonescu http://blog.alexsimo.com - Ray Bradbury
[email protected]
Concepts Some basic concepts. It won’t hurt, i promise.
work modes you don’t need to be connected to network
_offline first _no need of network _synchronize only when you want and what you want
Subversion?
Stages workspace staging area repository add commit working directory index
HEAD
workspace contains the files you are working on workspace working
directory
staging acts like intermediary zone staging area index
head node in git tree that points to last commit
repository HEAD
commit registers file snapshot in git graph git add <file>
git add --all git add *.java git commit -m “Commit message”
push send commits to remote repository git push origin master
git push origin develop
branch registers file snapshot in git graph git checkout -b
feature git branch -d feature git branch -v git branch -a
remote local repository can track more than one remote git
remote git remote -v git remote add origin <url>
stash registers file snapshot in git graph git stash git
stash list git stash apply stash@{0}
pull synchronizes and merges files from remote git pull origin
master
fetch updates your local remote- tracking branches (commits, branches and
tags) git fetch origin git fetch --all
merge merges given branch with actual; can produce conflicts $(develop)
git merge feature-oauth
diff useful to see differences between commits or branches git
diff <branch_a> <branch_b> git diff <commit_1> <commit_2>
tag associates tag to commit git tag v1.0 2b343csw2ff git
tag v1.0 <HEAD>
log displays last commits git log gitk
Commit message tips
message structure it should be like a tweet express more
in less type : subject body footer
choose right prefix be a good citizen motherfucker • feat:
a new feature • fix: a bug fix • docs: changes to documentation • style: formatting, missing semi colons, etc; no code change • refactor: refactoring production code • test: adding tests, refactoring test; no production code change • chore: updating build tasks, package manager configs, etc; no production code change
Workflow Daily basic workflow. You won’t need more.
1 work on your files 2 add edited files to
staging area 3 make a commit 4 push commits to remote server (optional) 5 pull remote files 6 work on your files upstream downstream
Workflow Pro workflow. How cool kids play. PROFESIONAL
None
Kata time
references stuff you should check http://udacity.github.io/git-styleguide/ http://rogerdudler.github.io/git-guide/index.es.html https://www.atlassian.com/git/ http://nvie.com/posts/a-successful-git-branching-model/
Thanks! Alexandru V. Simonescu
[email protected]