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
Collaborating with Git and GitHub - Girl Develo...
Search
Steven Loria
October 01, 2018
Programming
0
86
Collaborating with Git and GitHub - Girl Develop It Central VA
Slides for the Git/GitHub workshop for Girl Develop It Central VA
Steven Loria
October 01, 2018
Tweet
Share
More Decks by Steven Loria
See All by Steven Loria
marshmallow for data validation and serialization
sloria
0
450
Other Decks in Programming
See All in Programming
Flutterで分数(Fraction)を表示する方法
koukimiura
0
140
20251016_Rails News ~Rails 8.1の足音を聴く~
morimorihoge
2
590
Domain-centric? Why Hexagonal, Onion, and Clean Architecture Are Answers to the Wrong Question
olivergierke
3
930
その面倒な作業、「Dart」にやらせませんか? Flutter開発者のための業務効率化
yordgenome03
1
130
AIと人間の共創開発!OSSで試行錯誤した開発スタイル
mae616
2
750
実践Claude Code:20の失敗から学ぶAIペアプログラミング
takedatakashi
15
6.2k
はじめてのDSPy - 言語モデルを『プロンプト』ではなく『プログラミング』するための仕組み
masahiro_nishimi
3
720
Claude Agent SDK を使ってみよう
hyshu
0
1.3k
Six and a half ridiculous things to do with Quarkus
hollycummins
0
190
組込みだけじゃない!TinyGo で始める無料クラウド開発入門
otakakot
1
330
kiroとCodexで最高のSpec駆動開発を!!数時間で web3ネイティブなミニゲームを作ってみたよ!
mashharuki
0
750
あなたとKaigi on Rails / Kaigi on Rails + You
shimoju
0
170
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
44
7.8k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Building Adaptive Systems
keathley
44
2.8k
Bash Introduction
62gerente
615
210k
Thoughts on Productivity
jonyablonski
70
4.9k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Making the Leap to Tech Lead
cromwellryan
135
9.6k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.9k
Documentation Writing (for coders)
carmenintech
75
5.1k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
GraphQLとの向き合い方2022年版
quramy
49
14k
Transcript
Collaborating with git and GitHub Happy Hacktoberfest!
Set up 4 Create a GitHub account 4 Install and
set up git https://help.github.com/articles/set-up-git/ 4 In Terminal or Powershell: cd ~ mkdir projects cd projects
Welcome! Girl Develop It is here to provide affordable and
accessible programs to learn software through mentorship and hands-on instruction.
Some "rules" 4 We are here for you! 4 Every
question is important 4 Help each other 4 Have fun
Welcome! 4 Who are you? 4 Last meal you made?
4 OPTIONAL: What drew you to take this class?
Collaborating with git and GitHub 4 Distributed version control 4
GitHub 4 Hands-on
git 4 Version control 4 Code provenance
Like infinite save games!!!
None
And each save point tells a story
git is Collaborative
git is Distributed
Centralized vs. Distributed
Centralized
Centralized (svn) 4 Everybody works on same copy of project
4 Saving and sharing happen in the same step
None
Distributed (git)
Distributed VCS (git) 4 Everybody gets a copy 4 Sync
when you want to (merge copies) 4 Separates saving from sharing 4 Bonus: Lots of backups
GitHub
GitHub Where projects and their histories ("repos") are stored
https://github.com/GirlDevelopItCentralVA/gdi- centralva-directory
Workflow
None
Fork Make your copy on GitHub https://github.com/GirlDevelopItCentralVA/gdi- centralva-directory
None
Clone Download your copy from GitHub to your computer
None
$ git clone https://github.com/sloria/gdi-centralva-directory.git $ cd gdi-centralva-directory
None
Remotes
Remotes remote = name for a copy on GitHub Example:
"origin" is the name of the repo you cloned from
List your remotes $ git remote -v origin https://github.com/sloria/gdi-centralva-directory.git (fetch)
origin https://github.com/sloria/gdi-centralva-directory.git (push)
Remotes By convention: 4 "origin" = Your fork (sloria/gdi-centralva-directory) 4
"upstream" = The original version (GirlDevelopItCentralVA/gdi-centralva-directory)
Add a remote Add "upstream" as a remote
None
$ git remote add upstream https://github.com/GirlDevelopItCentralVA/gdi-centralva-directory.git
$ git remote -v origin https://github.com/sloria/gdi-centralva-directory.git (fetch) origin https://github.com/sloria/gdi-centralva-directory.git (push)
upstream https://github.com/GirlDevelopItCentralVA/gdi-centralva-directory.git (fetch) upstream https://github.com/GirlDevelopItCentralVA/gdi-centralva-directory.git (push)
None
Branches
A branch is a storyline
A branch is a storyline Example branch names: "fix-ui-bug", "add-more-docs"
List your branches $ git branch * master
Create a branch $ git branch add-steve-json
$ git branch add-steve-json * master
Switch branches $ git checkout add-steve-json $ git branch *
add-steve-json master
Add a File people/steve-loria.json { "name": "Steve Loria", }
See changed/added files
Stage the file Add file(s) that we want to save
$ git add .
None
Commit Save your changes git commit -m "Add my info"
None
Make more changes people/steve-loria.json { "name": "Steve Loria", "twitter": "sloria1",
"github": "sloria", "personal": "https://stevenloria.com" }
Review your changes
None
Stage the file Add the file $ git add .
None
Commit Save your changes git commit -m "Add more of
my info"
View Commit Logs $ git log
None
Push to your Fork Get your local changes onto your
fork on GitHub $ git push origin add-steve-json
On your fork on GitHub...
Send a Pull Request Request that your changes get incorporated
None
Pulling upstream changes Sync your local repo with other people's
changes $ git pull upstream master
None
Use git for everything
Git is not just for code Writing, data, design projects
Use git when you care about history
Use git for everything
Happy Hacktoberfest!