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
Jade Allen
September 14, 2012
Technology
360
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Intro to Git for the Python Hacker
A gentle introduction to git for a python programmer
Jade Allen
September 14, 2012
More Decks by Jade Allen
See All by Jade Allen
All About Regular Expressions
jadeallenx
1
310
Hexes, Charms and Spells
jadeallenx
0
190
3 > 2
jadeallenx
0
1.1k
Idiomatic Erlang
jadeallenx
0
210
The Sharp Edges of Leaky Abstractions
jadeallenx
0
140
Sagas: Distributed Transactions Without Locks
jadeallenx
0
590
Before Unix: Early History of Time-Sharing
jadeallenx
0
270
Functional Programming Made Me a Better Perl Developer
jadeallenx
1
380
Assigning Meanings to Programs
jadeallenx
0
300
Other Decks in Technology
See All in Technology
え?フロントエンドエンジニアの ワイがインフラも!?
puku0x
1
440
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
19k
もう一度考える SRE チームの作り方・育て方 / Rethinking SRE #1: Building and Growing SRE Teams
rrreeeyyy
6
1k
【CEDEC2026】ゲームシナリオライターを支援するAIツール開発の実践 ― 設計とプロンプトの工夫 ―
cygames
PRO
1
770
生成 AI の基礎 〜 サンプル実装で学ぶ基本原理
enakai00
7
4.4k
今こそ聞きたいソフトウェア設計 ドメイン駆動設計再入門
masuda220
PRO
17
6.8k
20260807_第6回_関東kaggler会LT_claw系bot xangiと始める、"寂しくない" kaggle
sugupoko
0
210
つくって納得、つかって実感! 大規模言語モデルことはじめ ver2.0
recruitengineers
PRO
3
1.2k
制約理論(ToC)入門 2026版
recruitengineers
PRO
6
2.1k
【CEDEC2026】『ウマ娘 プリティーダービー』 英語版のキャラクターの方言や口調をローカライズするための創造的アプローチ
cygames
PRO
1
200
メルカリのグローバルアプリで挑んだ AlloyDB 運用と課題解決の実践記
hatappi
0
240
攻撃と防御で学ぶAI時代のプロダクトセキュリティ演習
recruitengineers
PRO
7
2.2k
Featured
See All Featured
Everyday Curiosity
cassininazir
0
270
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
400
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
200
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
270
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
470
Making the Leap to Tech Lead
cromwellryan
135
10k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
Exploring anti-patterns in Rails
aemeredith
3
460
Darren the Foodie - Storyboard
khoart
PRO
3
3.6k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
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?!