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
350
4
Share
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
300
Hexes, Charms and Spells
jadeallenx
0
180
3 > 2
jadeallenx
0
1.1k
Idiomatic Erlang
jadeallenx
0
200
The Sharp Edges of Leaky Abstractions
jadeallenx
0
130
Sagas: Distributed Transactions Without Locks
jadeallenx
0
590
Before Unix: Early History of Time-Sharing
jadeallenx
0
260
Functional Programming Made Me a Better Perl Developer
jadeallenx
1
380
Assigning Meanings to Programs
jadeallenx
0
290
Other Decks in Technology
See All in Technology
ITエンジニアを取り巻く環境とキャリアパス / A career path for Japanese IT engineers
takatama
4
1.8k
Terraformモジュールは、なぜ「魔境」化するのか
hayama17
1
130
Spring AI × MCP 入門〜AIエージェントへのツール公開、境界設計から始める最小構成 〜
yuyamiyamoto
0
190
最低限これだけ押さえれ大丈夫_Claude Enterprise/Team企業展開ガバナンス入門
tkikuchi
1
580
Platform Engineering as a Product: Criteria for Improvement and Multi-Tenant Design
kumorn5s
0
440
AI時代の私の技術インプットとアウトプット術
tonkotsuboy_com
15
8.1k
Gradle×GitHub_ActionsでCI時間を約50%短縮 ジョブ分割の設計と落とし穴 / Cutting CI Time by ~50% with Gradle and GitHub Actions: Job-Splitting Design and Pitfalls
takatty
0
550
React、まだ楽しくて草
uhyo
7
3.1k
ルールやカスタム機能、どう使う?理想の出力を引き出すために今知りたいIBM Bob 5つの機能
muehara
0
160
『家族アルバム みてね』における インシデント対応との向き合い方 / Approach incident response in Family Album
kohbis
2
280
イベントストーミングとKiroの仕様駆動開発で実現する要件の認識合わせプロセス
syobochim
7
1k
20260528_生成AIを専属DSに_Howの次にすべきことを考える
doradora09
PRO
0
270
Featured
See All Featured
First, design no harm
axbom
PRO
2
1.2k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
210
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Skip the Path - Find Your Career Trail
mkilby
1
130
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1.1k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Everyday Curiosity
cassininazir
0
220
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
120
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
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?!