Commitmas 2015
-
Upload
matthew-broberg -
Category
Technology
-
view
29 -
download
0
Transcript of Commitmas 2015
Merry Commitmas!
Get Involved in Commitmas 2!• Wednesday 12/2 - Setting up Windows with Jonathan Frappier• Thursday 12/3 - Setting up OSX with Timmy Carr• Friday 12/4 - Clone, Add, Commit, & Push with Anthony Elizondo• Monday 12/7 - Branching Repositories with Mike Marseglia• Tuesday 12/8 - Forking Repositories and Pull Requests with Matt Oswalt
Full list: https://github.com/commitmas/30-days-of-commitmas-2015
about: me
@mjbrendergeek-whisperers.com
neckbeardinfluence.com
Build EMC Elect
Support @ EMC
Eng @ EMCCommunity @ EMC
Joined Geek Whisperers
Season of Startups
Dev Advocate
Blogger
Speaker
Open Source Addict
Agenda
• Why GitHub • Vocabulary• Examples
“Find me the version that we used last time.”
$ lsscript.last script.old script_version10_final_finalscript1 script4 script_version10_final_final_v2script2 script_version10_final scriptv9
$ lsscript
OR
Versioning done well
$ code --version v1.0.1
^ That's version control
http://semver.org
Versioning like a sysadmin 😎
$ cp config config.old ^ That's not version control
http://semver.org
Why Version Control?
• Each check in is a point in time that you annotate• Updates are coordinated and issues are isolated
Version controls use snapshot or deltas or similar to track changes. Git is the first that is completely distributed, making it decentralized and ideal for collaboration.
Why Version Control?
TL;DRCollaboration
Enterprise Collaboration
So Let’s GitHub
Define: GITHUB
GIT - DISTRIBUTED VERSION CONTROLHUB - A CONNECTY THING FOR BYTES
GITHUB = CODE * PEOPLE
As of 2015, GitHub reports having over 11.9 million users and over 30.1 million repositories (link)
Lingo Basics• Repository - directory of code• Branch - version of that code• Commit - checking in code• HEAD - symbolic reference to a commit
Lingo Intermediate• Merge conflict • Fast forward• LGTM • Ship it!
https://www.quora.com/GitHub/What-is-the-significance-of-the-Ship-It-squirrel
IMPORTANT:GIT SEES BLOBS, NOT FILES• Demo
Two Ways to Collaborate
READ/WRITE REPOSITORYFORK AND PULL REQUESTS
Git allows for local and remote copies of the code
BASIC WORKFLOW
• add code locally
• commit code locally
• push to remote branch
• repeat
BASICS WITH LINGO
• add code to staging area (aka the index)
• commit to local branch
• push to remote branch
• repeat
EXAMPLE OF READ/WRITE REPOSITORY
EXAMPLE OF READ/WRITE
EXAMPLE OF READ/WRITE
EXAMPLE OF READ/WRITE
EXAMPLE OF FORK AND PULL REQUESTS
EXAMPLE OF FORK AND PULL REQUESTS
EXAMPLE OF FORK AND PULL REQUESTS
EXAMPLE OF FORK AND PULL REQUESTS
EXAMPLE OF FORK AND PULL REQUESTS
BASICS WITH LINGO (AGAIN)
• add code to staging area (aka the index)
• commit to local branch
• push to remote branch
• repeat
COMMON WORKFLOW• run git status, find you're behind master• git pull --rebase• commit code locally• stash changes• git pull --rebase• stash pop• git push upstream, forgot to set upstream…• git remote add upstream upstream_URL
ADVICE FOR ENJOYING GITHUB• find excuses to use it• be patient (with yourself)• partner up
What’s the term for…• I’ve made edits to a copy of a repository I created. When I try to push it to origin, it says nothing committed. What didn’t I do?
•Helpful commands: • git status
Need to *add* in order to commit!
What’s the term for…•I have edits I want to share with the original repo owner. What do I do?
•Helpful commands: • git remote -v
Open a Pull Request!
Open a Pull Request!
My favorite resources• Atlassian Workflow• Git from the Trenches• Git tutorial• Stackoverflow
Get Involved in Commitmas 2!• Wednesday 12/2 - Setting up Windows with Jonathan Frappier• Thursday 12/3 - Setting up OSX with Timmy Carr• Friday 12/4 - Clone, Add, Commit, & Push with Anthony Elizondo• Monday 12/7 - Branching Repositories with Mike Marseglia• Tuesday 12/8 - Forking Repositories and Pull Requests with Matt Oswalt
Full list: https://github.com/commitmas/30-days-of-commitmas-2015
>>>
+1 commit
+1 commit
+1 commit