# You should set these two: git config --global user.name "Your Name" git config --global user.email "you@example.com" # Optional, but recommended: git config --global color.ui "auto" # Optionally, pick one editor to use: git config --global core.editor "nano" # Default, if you do nothing. git config --global core.editor "gedit -w -s" # Recommended option. git config --global core.editor "vim" git config --global core.editor "emacs"
Setup up a GitHub account if you don't already have one: www.github.com
Give people time to get settled. They should run this if have they time.I tend to talk really fast when I get excited, may use magical shortcuts and hotkeys without thinking about it, so if I do something you don't understand:
PLEASE tell me to "slow down and explain yourself!"
That being said, I like to keep things informal so please ask questions during the talk.You have code that works.
Now you have to implement a new feature.
After changing a few things, nothing works anymore.
What do you do?
That's what the Undo button is for. But what about code from 6 months ago. Even 6 hours ago. 6 minutes ago - new feature. Concept of revision may be good here. Working on multiple copies of code.You're working on a project with someone.
You make some changes.
How do you give those changes back?
USB, Dropbox.Carrier Pidgeon (RFC 1149)
Dropbox
Sneakernet - USB
Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway. - Andrew S. Tanenbaum
How do you put the data back together so that it works?
A Standard for the Transmission of IP Datagrams on Avian Carriers1974 Douglas McIlroy writes diff for Unix 5th Edition.
--- /path/to/original''timestamp'' +++ /path/to/new''timestamp'' @@ -1,3 +1,9 @@ +This is an important +notice! It should therefore be located at +the beginning of this document! + This part of the document has stayed the same from version to @@ -5,16 +11,10 @@ be shown if it doesn't change. Otherwise, that would not be helping to -compress the size of the changes. - -This paragraph contains -text that is outdated. -It will be deleted in the -near future. +compress anything.
1985 Larry Wall writes patch for sending diffs through networks.
Not a new problem. diff can also be called a delta. or a difference in files. patch takes those diff files and updates your current files. In 1985 networks, you didn't want to send a whole file.You're in charge of a project used by millions of users.
You receive thousands of patches per release.
You don't trust everyone.
You're Finnish.
Centralized Workflow
Push and Pull from Central Repository
Define Repository of code. Define: push, pull. Not a bad model. Used by SVN. Problem: Who decides merges?For the Linux Kernel, different sub-systems have their own maintainers: networking, CPU, power, all the various drivers, etc...
You have the same structure as a distributed workflow but with more social structure.Must get forking and merging right
Otherwise everything falls apart.
https://github.com/blog/1124-how-we-use-pull-requests-to-build-github
How GitHub uses GitHub internally.You should not ever edit code directly on a server!
Push code to a remote service.
Have it tested and deployed automatically.
Etsy deploys more than 50 times a day.
Etsy uses Jenkins as CI tool.Learn your Unix tools, your Text Editor, your Source Control, your scripting languages.
Don't be afraid!
"Civilised tool for a civilized age" - some guy on the internet
You may not always use the same tool.To protect us from ourselves.
Software is complex, every part is moving at once. Always use it!Directed Acyclic Graph
Learn your data structures!