4. DevNet Zone Challenge – DevNet Zone Mobile App
• Download for iOS or Android
• Sign in with Cisco.com ID (not Cisco Live!)
• Visit Demos, attend Sessions and you’ll be
credited through Bluetooth on your device
• Complete Learning Labs and be
automatically credited
• Head to Info Desk to get your prize!
• 3 Levels of Prizes at 2, 5 and 10
activities
• Have the InfoDesk Staffer check off
your prize collection in the app!
6. As si618 said on Stack Overflow
“Have you ever:
• Made a change to code, realised it was a mistake and wanted to revert back?
• Lost code or had a backup that was too old?
• Had to maintain multiple versions of a product?
• Wanted to see the difference between two (or more) versions of your code?
• Wanted to prove that a particular change broke or fixed a piece of code?
• Wanted to review the history of some code?
• Wanted to submit a change to someone else's code?
• Wanted to share your code, or let other people work on your code?
• Wanted to see how much work is being done, and where, when and by whom?
• Wanted to experiment with a new feature without interfering with working code?
In these cases, and no doubt others, a version control system should make your life easier.”
6
http://stackoverflow.com/a/1408464
7. DISTRIBUTED VERSION CONTROL
• Opens up to new workflows: git flow
• Each system has an exact replica of the repo as other collaborators.
7
https://git-scm.com/images/about/workflow-b@2x.png
8. Under the hood
• Changes are stored in trees
• Trees contain changed files
• Commits contain trees
8
http://git-scm.com/figures/18333fig0903-tn.png
9. GIT CONFIG
• So you can be held accountable, configure git
9
$ git config --global user.name "Your Name Comes Here"
$ git config --global user.email you@yourdomain.example.com
10. GIT INIT
• Initializes a project directory with a hidden directory /.git/
10
$ tar xzf project.tar.gz
$ cd project
$ git init
11. GIT ADD
• Add any files in your repository to git “stage”
11
$ git add .
https://git-scm.com/images/about/index1@2x.png
12. GIT COMMIT
• Store your changes into a commit
12
$ git commit –m ’Initial commit’
13. BRANCHING: Your safe place
• Makes a pointer to your
code
• Moves HEAD around
13
http://git-scm.com/figures/18333fig0307-tn.png
$ git branch <name>
$ git branch testing
$ git commit –m “new”
$ git checkout master
14. MERGING
• git merge <topic>
• You must be on the branch you want to merge INTO when you execute this
command (e.g. master)
14
$ git merge <topic>
15. Git over SSH vs HTTP
• No password
• Set up SSH key on remote server
15
$ git clone git@github.com:aroach/upgraded-guacamole.git
$ git clone https://github.com/aroach/upgraded-guacamole.git