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
XP, Testing and ninja testing
m_seki
3
180
設計やレビューに悩んでいるPHPerに贈る、クリーンなオブジェクト設計の指針たち
panda_program
6
1.3k
Go1.25からのGOMAXPROCS
kuro_kurorrr
1
800
DroidKnights 2025 - 다양한 스크롤 뷰에서의 영상 재생
gaeun5744
3
310
F#で自在につくる静的ブログサイト - 関数型まつり2025
pizzacat83
1
310
プロダクト志向ってなんなんだろうね
righttouch
PRO
0
160
WindowInsetsだってテストしたい
ryunen344
1
190
なんとなくわかった気になるブロックテーマ入門/contents.nagoya 2025 6.28
chiilog
1
190
Julia という言語について (FP in Julia « SIDE: F ») for 関数型まつり2025
antimon2
3
980
「ElixirでIoT!!」のこれまでとこれから
takasehideki
0
370
datadog dash 2025 LLM observability for reliability and stability
ivry_presentationmaterials
0
110
ReadMoreTextView
fornewid
1
470
Featured
See All Featured
Producing Creativity
orderedlist
PRO
346
40k
Adopting Sorbet at Scale
ufuk
77
9.4k
BBQ
matthewcrist
89
9.7k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Code Review Best Practice
trishagee
68
18k
Fireside Chat
paigeccino
37
3.5k
A better future with KSS
kneath
239
17k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.4k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
35
2.3k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
Documentation Writing (for coders)
carmenintech
71
4.9k
For a Future-Friendly Web
brad_frost
179
9.8k
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!