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
Intro to Git for the Python Hacker
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Jade Allen
September 14, 2012
Technology
4
350
Intro to Git for the Python Hacker
A gentle introduction to git for a python programmer
Jade Allen
September 14, 2012
Tweet
Share
More Decks by Jade Allen
See All by Jade Allen
All About Regular Expressions
jadeallenx
1
280
Hexes, Charms and Spells
jadeallenx
0
170
3 > 2
jadeallenx
0
1.1k
Idiomatic Erlang
jadeallenx
0
170
The Sharp Edges of Leaky Abstractions
jadeallenx
0
110
Sagas: Distributed Transactions Without Locks
jadeallenx
0
580
Before Unix: Early History of Time-Sharing
jadeallenx
0
240
Functional Programming Made Me a Better Perl Developer
jadeallenx
1
370
Assigning Meanings to Programs
jadeallenx
0
260
Other Decks in Technology
See All in Technology
vLLM Community Meetup Tokyo #3 オープニングトーク
jpishikawa
0
120
Datadog Cloud Cost Management で実現するFinOps
taiponrock
PRO
0
140
EMからVPoEを経てCTOへ:マネジメントキャリアパスにおける葛藤と成長
kakehashi
PRO
7
890
製造業ドメインにおける LLMプロダクト構築: 複雑な文脈へのアプローチ
caddi_eng
1
460
【SLO】"多様な期待値" と向き合ってみた
z63d
2
310
20260305_【白金鉱業】分析者が地理情報を武器にするための軽量なアドホック分析環境
yucho147
1
180
「データとの対話」の現在地と未来
kobakou
0
1.3k
Lookerの最新バージョンv26.2がやばい話
waiwai2111
1
160
Shifting from MCP to Skills / ベストプラクティスの変遷を辿る
yamanoku
2
200
自動テストが巻き起こした開発プロセス・チームの変化 / Impact of Automated Testing on Development Cycles and Team Dynamics
codmoninc
1
1.1k
マルチロールEMが実践する「組織のレジリエンス」を高めるための組織構造と人材配置戦略
coconala_engineer
3
430
Startups on Rails: 2026 at RubyConf Thailand
irinanazarova
0
100
Featured
See All Featured
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
450
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
880
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
94
Amusing Abliteration
ianozsvald
0
120
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
170
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Chasing Engaging Ingredients in Design
codingconduct
0
130
Accessibility Awareness
sabderemane
0
73
How to train your dragon (web standard)
notwaldorf
97
6.5k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Transcript
Intro to Git! for Python Hackers! ! ! Mark Allen!
[email protected]
! @bytemeorg! http://byte-me.org! https://github.com/mrallen1!
Distributed ! Version ! Control! System!
Fast! !
Tons of features! !
Pervasive use in the community!
Worst. Interface. Evar.!
1. Terms and lingo! 2. Basic workflow! 3. Topic branches!
4. Starting and/or contributing to github projects.! 5. Cool Python stuff!
Terms / Lingo http://marklodato.github.com/visual-git-guide/index-en.html!
Terms / Lingo http://marklodato.github.com/visual-git-guide/index-en.html!
Basics subversion! ! $ svn co \! https://example.com! $ vim
myfile.py! $ svn status! $ svn diff! $ svn ci -m'My commit'! git! ! $ git clone \! https://example.com! $ vim myfile.py! $ git status! $ git add -- myfile.py! $ git diff! $ git commit \! -m'My commit'! $ git push!
Basics ! $ git clone https://example.com! $ vim myfile.py! $
git diff! $ git add myfile.py ! $ git status! $ git commit -m'My commit'! $ git push origin master! origin Where What
I want to...! !create a new local repository! $ mkdir
myproject! $ cd myproject! $ git init! Basics
I want to...! ! ! !copy a remote repository! !
$ git clone https://example.com! $ git clone
[email protected]
:project.git! Basics
I want to...! ! ! !stage a file for a
commit! ! $ git add -- myfile.py! Basics
I want to...! create a commit! ! $ git commit!
Basics
I want to...! add to the last commit! ! $
git commit --amend! Basics
I want to...! ! ! diff against a commit! !
$ git diff! $ git diff HEAD^! $ git diff HEAD~4! $ git diff 1bc38 -- myfile.py! Basics
I want to...! ! ! ! see commit history! !
$ git log! Basics
I want to...! ! ! !update a local repository! !
$ git pull! Basics
I want to...! give a commit a memorable reference! !
$ git tag mytag 1bec3! $ git push --tags! $ git diff mytag -- a.py! Basics
I want to...! add a remote storage location! ! $
git remote add origin https://example.com! ! -also-! ! $ git remote rm origin! Basics
I want to...! push my local work to a remote
location! ! $ git push! $ git push -u origin foo! Basics
I want to...! temporarily save my work and work on
something else! $ git stash! # ...! $ git stash pop! Basics
Git commands ! • are (mostly) scripts! • bash, python,
perl! • you can extend!
Topic branches! ! • What are they?! • Why are
they useful?! • How do you use them?! Topic branches
$ git branch rt14322! $ git checkout rt14322! -or-! $
git checkout -b rt14322! ...! Topic branches
$ git checkout master! $ git merge rt14322! Topic branches
GitHub
GitHub
GitHub https://github.com/signup/free!
GitHub
GitHub
GitHub
GitHub
GitHub
GitHub
GitHub
GitHub
GitHub
GitHub
GitHub
GitHub
GitHub
GitHub
GitHub
GitHub
GitHub
GitHub
GitHub
GitHub
GitHub
GitHub
GitHub
GitHub
GitHub
GitHub
GitHub
GitHub
GitHub Congratulations, your pull request was submitted!! ! Things to
do now:! • Relax! • Have a tasty beverage! • Enjoy the accolades of a grateful Python community!
Augh! My library is in CVS or SVN!! • I'm
sorry for your pain.! • Github has tools and guides to help you migrate!
Cool Python Stuff! • dulwich, a pure python git implementation!
• GitPython, wraps git command line tools! • Legit, a more humane git CLI (by Kenneth Reitz)! Python
Cool Python Stuff! • pygit2 - Python binding for libgit2
(an alternative C implementation)! • git-cola - a graphical git client written in Python! Python
Thank you!! Questions?!