SlideShare une entreprise Scribd logo
1  sur  66
itcampro@ itcamp13# Premium conference on Microsoft technologies
Git crash course for Visual
Studio devs
Alessandro Pilotti
Cloudbase Solutions
MVP ASP.Net / IIS
@alexpilotti
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
MobileHuge thanks to our sponsors!
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• Why Git?
• Basics
• Visual Studio integration
• Remote repositories
• Branching
• Merging and rebasing
• Forks and github, bitbucket, etc
• Continuous deployment
• Gerrit
• Azure support
Agenda
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• Why do we need an ENTIRE session on a VCS
instead of talking about code? 
• Previous VCS are so simple:
– CVS
– Subversion
– Sourcesafe (D’oh)
• In short, it’s because there’s way more than
the usual commit / checkout thing 
Why Git?
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• Developed initially by Linus Torvalds in 2005
– Used for the Linux Kernel
– GPLv2
– Multiplatform (Linux, Windows, OSX, FreeBSD)
• Some design goals:
– Fast and efficient
– Support for non linear development
– Distributed
– Easy publishing
– Garbage collection
Git
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• In most cases, you just start work on a
project using it 
– In my case, OpenStack
• Most OSS projects are hosted on github
– CodePlex supports Git as well
• Ease to branch, merge, fork
• Once you start using it, it’s hard to go back
Why should I use it?
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• http://msysgit.github.io/
– Command line
• http://windows.github.com/
• Visual Studio 2012 Update 2
• NetBeans
• Eclipse
• TortoiseGit
• etc
Windows clients
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• A Git repository is a directory tree containing
your project(s)
– A hidden directory “.git” contains all the Git stuff
• Start a repo from scratch:
– git init
• Cloned from an existing repo:
– git clone
https://github.com/cloudbase/cloudbase-init
Basics
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• Files are either:
– Staged (git knows about them)
– Untracked (git doesn’t care about them)
• To stage a file / directory:
– git add path
• To unstage and delete a file:
– git rm path
• To unstage w/o deleting it:
– git rm –cached path
Staging files
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• As simple as:
– git commit –a –m “Don’t forget the commit
msg”
• To commit a file:
– git commit -m msg path
• Being a distributed VCS, a commit is only
local
• Do small commits, atomic and cohesive
– With a clear commit message
– A VCS is not a backup tool 
Commit
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• You can look at the history for the current
branch with a simple:
– git log
– git log --pretty=oneline
• To see your staged (uncommitted) changes:
– diff format
– git diff
• To see the differences between two commits:
– git diff commit1 commit2
Git log, show and diff
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• With checkout you can get a file or a working
copy of your repository:
– E.g.: to undo your work to the latest commit:
– git checkout (entire repo)
– git checkout file (single file only)
• To checkout a file to a previous version:
– git checkout commitref file
– E.g.: to get the previous version:
• git checkout HEAD^ file
• git checkout HEAD^
checkout
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• git config --global user.name ”My Name”
• git config --global user.email myuser@mydomain.com
• git config --global color.ui true
• git config --global core.editor notepad++
– Note: add the editor to your path first (elevated console):
• SETX PATH “%PATH%;%ProgramFiles% (x86)Notepad++” /M
– Even better, getting used to vi is not so terrible 
• git config --global core.autocrlf true
– Values: true, input, false
– Set true if you work on multiplatform projects
– See .gitattributes later for this as well
Global settings
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
MobileGit and Visual Studio 2012
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• VS 2012 Update 2 required
• Install Visual Studio Tools for Git
• Tools -> Options -> Source Control
– Choose “Microsoft Git provider”
• Open “Team Explorer”
– View -> Team Explorer
• You can use also regular git commands in
– Package Manager Console
Git and Visual Studio 2012
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• Connect to Team Projects (socket icon)
– Clone
– Set the remote repo URL
– Specify a local path
VS 2012 Clone a repo
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• RC available now
• http://blogs.msdn.com/b/visualstudioalm/arc
hive/2013/05/07/release-candidate-to-visual-
studio-update-3-now-available.aspx
• Bug fixes
• Git TFS continuous integration support
VS 2012 Update 3
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
MobileVS2012 U3 Git
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
MobileTFS + Git
TFS supports GIT natively! http://bit.ly/Z1RkcV
Signup for a free account here:
https://tfs.app.visualstudio.com/_account/Signu
p
itcampro@ itcamp13# Premium conference on Microsoft technologies
VS2012 GIT DEMO
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• git contains all the info related to your repo
in “.git/”
• Your files (working copy), are simply a human
readable copy of the files 
– Bare repositories have no working copy
• The Index contains info about staged files
• File contents are stored into blobs
• Other objects include trees (the filesystem
refresentation) and commits
• Every object is identified with a SHA1 hash
A bit of internals
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• You can refer to commits with their SHA1
hash or with a shorter unique prefix, e.g.:
– git log e46bf2165f29f579051b8e12ebe63e5512205610
– git log e46bf2
• Or you can refer to a commit using a
reference:
– every branch has a “head” identifying the last
commit
• git checkout branchname
Refs
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• HEAD is a special symbolic link pointing to the
head of the current branch
• You can do some “arithmetic” with refs:
– ^ points to the previous commit
– ~n points to the nth previous commit
– HEAD^^^ the 3rd commit before HEAD
– HEAD~3 (same as the above example)
• Note: use (quotes) “HEAD^” in the Windows
cmd prompt
Refs
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• A tag is simply a friendly name for a commit
– git tag v1.0 HEAD
• Annotated tags are stored as full objects:
– git tag –a v1.0 –m “Version 1.0” HEAD
• Don’t confuse tags with a branches
Tags
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• Git is a distributed VCS
• You can “sync” your local copy with remote
copies anytime, by either “pull” or “push”
changes
• Git has no concept of a “server”
– Repos form a peer network
• It’s useful anyway to elect an “authoritative”
repository. E.g.:
– A repo on github, bitbucket, etc
– The project lead developer’s repo
Remote repositories
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• A remote is simple a name and an url
• List remotes:
– git remote
• Add a remote:
– git add origin https://github.com/openstack/nova.git
• Note: this will track all remote branches, use –t <branchname> to
limit
• Protocols to access the remote repo can be:
– Local filesystem, HTTP/HTTPS, git, rsync
– Local fileystem on Windows:
• file:///c/your/path/repo.git
Configuring remotes
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• Remove a remote:
– git remote rm name
• Changing a remote url is a frequent
operation:
– git remote set-url <newurl> <remote_name>
• Cleaning stale remote tracking branches
– git remote prune <remote_name>
Configuring remotes
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• A bare repository doesn’t have a working
copy of your content
• Use it when you create an authoritative
“server” repo
• By convention bare repo folder names end it
“.git” e.g.: “myrepo.git”
• git init --bare
Bare repositories
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• A typical operation consists in cloning a
remote repository (will set the proper remote
as well):
– git clone <url>
• To update a local repository with remote
commits:
– git pull
• This is a shortcut for git fetch and git merge
FETCH_HEAD
Clone / pull
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• Updating a remote repository consists in:
– git push <remote> <branch>
– git push origin master
• Note: you must first make sure that you
pulled all the remote commits first!
• More on merging / rebasing later!
Push
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• Git was created to make branching and
merging as easy as possible.
• “master” is the default branch
• From an application lifecycle standpoint we
can define two types of branches:
– Long lived
• Typically major releases
– Short lived
• Bug fixes, dev experiments, etc
• Git makes no difference of course
Branches
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• Creating a branch is simply:
– git chekout –b name
– Shortcut for git branch name and git checkout name
• Switch to a different branch:
– git checkout name
– This will also change the working directory contents to reflect
the branch commits!!
• To list existing branches:
– git branch
– The active branch is marked with “*”
• To remove a branch:
– git branch –d name
Branches
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
MobileHow does it look like?
A B
C
Dmaster
new-feature
E
F
experiment
master commits: A, B, D
new-feature commits: A, B, C, E
experiment commits : A, B, C, E, F
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• In most cases at some point you’d like to merge
the content of a branch into another
• For example, you develop a new feature and
once it’s done tested and reviewed you want to
merge it in the master branch
• git-merge merges a branch into the current one:
– git checkout master
– git merge new-feature
Merge
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
MobileHere’s how a merge looks like
A B
C
Dmaster
new-feature
E
F
experiment
G
master commits: A, B, D, C, E, G
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• What happens when the same file has been
changed in two branches?
• Git is very smart in applying different commit
patches to the same source when lines do
not overlap (e.g. 2 different methods)
• But sometimes you just have to handle
conflicts, it’s a hard life 
Conflicts
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
git merge branch_name
CONFLICT (content): Merge conflict in test.txt
Automatic merge failed; fix conflicts and then
commit the result.
D’oh!
Edit the conflicting files…
git add files
git commit -a
Conflicts
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• You can also rollback the merge with:
– git merge –abort
• A merge happens also when you pull a remote branch
– The resolution process is the same
• Once the merge succeeds, you can delete the merged
branch if you don’t need it anymore
• You can also keep on working on the merged branch and
merge it again later
• When you merge a branch w/o conflicts (fast-forwarding)
by default a merge commit is not created. This can be
changed with git merge –no-ff etc
Merge notes
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• Rebasing a branch consists in taking the
commits of another branch and applying
them on the current branch before any
commit added to the current branch.
• Typically this is used to bring a local branch
up to date with remote commits
• Merge vs rebase can create a bit of confusion
to users
Rebase
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
MobileRebase example
A B
C
Dmaster
new-feature
E
F
git checkout new-feature
git rebase master
Note: rebased commits have a new hash!
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
CONFLICT (content): Merge conflict in test3.txt
Failed to merge in the changes.
Patch failed at 0002 asdasdd
The copy of the patch that failed is found in:
/Users/anorex/Downloads/testgit/.git/rebase-apply/patch
When you have resolved this problem, run
"git rebase --continue".
If you prefer to skip this patch, run
"git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase -
-abort".
Rebase conflicts
• Similar to resolving a merge
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• What if you just one to pick a single commit
from another branch without having to
merge / rebase the entire branch?
• E.g. backporting a bug fix from v1.2 to v1.1
• git cherry-pick commit1
• git cherry-pick start..end
Cherry picking
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
MobileCherry-pick example
A B
C
Dmaster
new-feature
E
F
D
’
git checkout new-feature
git cherry-pick D
Note: cherry-picked commits have a new hash!
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• Sometimes you might need to remove or reorder
commits (locally only don’t do that after a push!)
• This can be done interactively with git rebase:
• git rebase –i “HEAD~4”
• Just remove or reorder the lines in the editor:
– pick 37c449c My first commit
– pick 3982180 My second commit
– pick 6055a10 My last commit
Reordering and removing
commits
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• There’s a good chance that your dev branch
commits will be a mess 
• Git gives you a chance to clean them up before
pushing them upstream using git rebase, e.g.:
• git rebase –i HEAD~3
– pick 37c449c My first commit
– squash 3982180 My second commit
– squash 6055a10 My last commit
Squashing
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• Changing the content of the last commit is a
frequent action:
– Typos
– Missing files
– Errors discovered after committing
• Just add --amend to the commit command:
• git commit –a --amend
Change the last commit
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• Sometimes you might need to revert a
commit
• Removing a commit is in general a bad idea
unless the commit appear only locally, so
reverting is a good alternative
• git revert <commit>
• This action will generate a new commit
Revert
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• There are cases in which the only way to get
out of a messy local repository is to restore it
to a previous state
• git reset --soft <commit>
– Doesn’t modify index and working dir
• git reset --mixed <commit>
– Modifies the index but not the working dir
• git reset --hard <commit>
– Modifies the index AND the working dir
git reset
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• .gitignore is a special file in your repository
that contains rules for files and folders that
will not be tracked
• Example:
*.exe
*.dll
*.obj
*.pdb
.gitignore
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• On Window you might want to deal with
CRLF / LF on a per-project base
• in .gitattributes add:
• text eol=lf
.gitattributes
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• Git provides support for SVN repositories as
well
• There’s quite a lot to discuss on the subject
• Just as an introduction:
• git svn clone <svn_url> <repo.git>
• git svn fetch
• git svn dcommit
Git and Subversion
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• Hooks let you run custom code on given
events
• E.g.: for push events:
– pre-receive hook
– for each update ref:
• update hook
• update ref
– post-receive hook
– post-update hook
Hooks
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• Hooks are scripts stored in .git/hooks/
• Each script has the name of the hook
– Must be executable (Unix)
• Parameters are passed in the command line
• On Windows, you can use Powershell
– But you need a MSYS script (sh, bash, etc)
#!/bin/bash
powershell -executionpolicy RemoteSigned -
File C:pathpost-receive.ps1 "$@" <
/dev/stdin
Writing hooks
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
function ProcessRef($old, $new, $ref) {
"old {0} new {1} ref {2}" -f ($old, $new, $ref) |
Out-File -append ”C:Testpost-receive.txt"
}
$lines = while(($line=[Console]::ReadLine())){$line}
foreach($line in $lines)
{
$values = $line.Split(" ")
$old = $values[0]
$new = $values[1]
$ref = $values[2]
ProcessRef $old $new $ref
}
Example Powershell post-receive
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• Github did a tremendous job in popularizing Git,
becoming currently the “de facto” standard platform
for open source projects
• Very intuitive and rich web interface
• Fork and pull requests
• Rich APIs for continuous deployment and more
• BitBucket offers similar services, including a limited
number of free private repos
Github, Bitbucket & co.
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
MobileFork
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• Anybody can fork a public repo
• Users with proper access can fork a private one
• In Github, forks are a good thing
• After committing code to your fork, you can
send a “pull request” to the maintainer of the
original repository
• The maintainer can review it, approve and
merge it
Fork and pull requests
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• A modern application lifecycle management
needs to consider a proper framework for:
– Code review
– Unit testing
– Continuous integration
• Integration system tests
– Continuous deployment
• Optionally / Ideally
• Git’s distributed nature helps a lot
Code review, unit testing and CI
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• Gerrit is an open source code review solution
based on Git
– https://code.google.com/p/gerrit/
• Written in Java
• Multiplatform
Gerrit
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
MobileGerrit
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• Git provides a very easy model to extend the
existing command set
• git review is the extension provide for Gerrit
integration
– https://pypi.python.org/pypi/git-review
– Requires Python
• Install on Windows with:
– easy_install.exe git-review
Git review workflow
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• git checkout -b newbranch
• git review -s
• git commit -a
• git-review
• Your commits is now available for review on the Gerrit
web site
• Jenkins and CI tools can be executed and vote
• Human review and approval occurs
• Jenkins and CI tools can be executed again
• The commits merge into the master branch
• New versions of the same patchset can be sent with:
• git commit -a --amend
• git review
Gerrit workflow
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
MobileGit and Azure web sites
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
MobileGit and Azure web sites
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• Integrate Powershell with Git?
• http://www.hanselman.com/blog/PromptsAn
dDirectoriesEvenBetterGitAndMercurialWithP
owerShell.aspx
Posh-Git
itcampro@ itcamp13# Premium conference on Microsoft technologies
Q & A

Contenu connexe

Tendances

Yocto project and open embedded training
Yocto project and open embedded trainingYocto project and open embedded training
Yocto project and open embedded trainingH Ming
 
Modulesync- How vox pupuli manages 133 modules, Tim Meusel
Modulesync- How vox pupuli manages 133 modules, Tim MeuselModulesync- How vox pupuli manages 133 modules, Tim Meusel
Modulesync- How vox pupuli manages 133 modules, Tim MeuselPuppet
 
Composer (PHP Usergroup Karlsruhe)
Composer (PHP Usergroup Karlsruhe)Composer (PHP Usergroup Karlsruhe)
Composer (PHP Usergroup Karlsruhe)Nils Adermann
 
Build your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectBuild your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectYen-Chin Lee
 
An introduction to git
An introduction to gitAn introduction to git
An introduction to gitolberger
 
Introduction to git administration
Introduction to git administrationIntroduction to git administration
Introduction to git administrationShawn Doyle
 
Run Qt on Linux embedded systems using Yocto
Run Qt on Linux embedded systems using YoctoRun Qt on Linux embedded systems using Yocto
Run Qt on Linux embedded systems using YoctoMarco Cavallini
 
Virtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 MayVirtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 MayPuppet
 
Symfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim RomanovskySymfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim Romanovskyphp-user-group-minsk
 
Michele Dionisio & Pietro Lorefice - Developing and testing a device driver w...
Michele Dionisio & Pietro Lorefice - Developing and testing a device driver w...Michele Dionisio & Pietro Lorefice - Developing and testing a device driver w...
Michele Dionisio & Pietro Lorefice - Developing and testing a device driver w...linuxlab_conf
 
Building RT image with Yocto
Building RT image with YoctoBuilding RT image with Yocto
Building RT image with YoctoAlexandre LAHAYE
 
Yocto: Treinamento em Português
Yocto: Treinamento em PortuguêsYocto: Treinamento em Português
Yocto: Treinamento em PortuguêsOtavio Salvador
 
Creating new Tizen profiles using the Yocto Project
Creating new Tizen profiles  using the Yocto ProjectCreating new Tizen profiles  using the Yocto Project
Creating new Tizen profiles using the Yocto ProjectLeon Anavi
 
Distro Recipes 2013 : Contribution of RDF metadata for traceability among pro...
Distro Recipes 2013 : Contribution of RDF metadata for traceability among pro...Distro Recipes 2013 : Contribution of RDF metadata for traceability among pro...
Distro Recipes 2013 : Contribution of RDF metadata for traceability among pro...Anne Nicolas
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsSymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsPablo Godel
 

Tendances (20)

Yocto project and open embedded training
Yocto project and open embedded trainingYocto project and open embedded training
Yocto project and open embedded training
 
Modulesync- How vox pupuli manages 133 modules, Tim Meusel
Modulesync- How vox pupuli manages 133 modules, Tim MeuselModulesync- How vox pupuli manages 133 modules, Tim Meusel
Modulesync- How vox pupuli manages 133 modules, Tim Meusel
 
Composer
ComposerComposer
Composer
 
Composer (PHP Usergroup Karlsruhe)
Composer (PHP Usergroup Karlsruhe)Composer (PHP Usergroup Karlsruhe)
Composer (PHP Usergroup Karlsruhe)
 
Build your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectBuild your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto project
 
An introduction to git
An introduction to gitAn introduction to git
An introduction to git
 
Basic Git Intro
Basic Git IntroBasic Git Intro
Basic Git Intro
 
Introduction to git administration
Introduction to git administrationIntroduction to git administration
Introduction to git administration
 
Run Qt on Linux embedded systems using Yocto
Run Qt on Linux embedded systems using YoctoRun Qt on Linux embedded systems using Yocto
Run Qt on Linux embedded systems using Yocto
 
Virtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 MayVirtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 May
 
Git training v10
Git training v10Git training v10
Git training v10
 
Symfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim RomanovskySymfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim Romanovsky
 
Michele Dionisio & Pietro Lorefice - Developing and testing a device driver w...
Michele Dionisio & Pietro Lorefice - Developing and testing a device driver w...Michele Dionisio & Pietro Lorefice - Developing and testing a device driver w...
Michele Dionisio & Pietro Lorefice - Developing and testing a device driver w...
 
Building RT image with Yocto
Building RT image with YoctoBuilding RT image with Yocto
Building RT image with Yocto
 
Yocto: Treinamento em Português
Yocto: Treinamento em PortuguêsYocto: Treinamento em Português
Yocto: Treinamento em Português
 
Creating new Tizen profiles using the Yocto Project
Creating new Tizen profiles  using the Yocto ProjectCreating new Tizen profiles  using the Yocto Project
Creating new Tizen profiles using the Yocto Project
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
 
Distro Recipes 2013 : Contribution of RDF metadata for traceability among pro...
Distro Recipes 2013 : Contribution of RDF metadata for traceability among pro...Distro Recipes 2013 : Contribution of RDF metadata for traceability among pro...
Distro Recipes 2013 : Contribution of RDF metadata for traceability among pro...
 
Lab manual
Lab manualLab manual
Lab manual
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsSymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
 

En vedette

ITCamp 2011 - Tudor Damian - Private Cloud, the Good, the Bad and the Ugly
ITCamp 2011 - Tudor Damian - Private Cloud, the Good, the Bad and the UglyITCamp 2011 - Tudor Damian - Private Cloud, the Good, the Bad and the Ugly
ITCamp 2011 - Tudor Damian - Private Cloud, the Good, the Bad and the UglyITCamp
 
ITCamp 2011 - Mihai Tataran, Tudor Damian - Keynote
ITCamp 2011 - Mihai Tataran, Tudor Damian - KeynoteITCamp 2011 - Mihai Tataran, Tudor Damian - Keynote
ITCamp 2011 - Mihai Tataran, Tudor Damian - KeynoteITCamp
 
ITCamp 2013 - Tiberiu Covaci & Sorin Stan - IASA Romania, what’s in it for me
ITCamp 2013 - Tiberiu Covaci & Sorin Stan - IASA Romania, what’s in it for meITCamp 2013 - Tiberiu Covaci & Sorin Stan - IASA Romania, what’s in it for me
ITCamp 2013 - Tiberiu Covaci & Sorin Stan - IASA Romania, what’s in it for meITCamp
 
ITCamp 2013 - Tobiasz Koprowski - 2AM A Disaster Just Began
ITCamp 2013 - Tobiasz Koprowski - 2AM A Disaster Just BeganITCamp 2013 - Tobiasz Koprowski - 2AM A Disaster Just Began
ITCamp 2013 - Tobiasz Koprowski - 2AM A Disaster Just BeganITCamp
 
ITCamp 2011 - Adrian Stoian - System Center Configuration Manager 2012
ITCamp 2011 - Adrian Stoian - System Center Configuration Manager 2012ITCamp 2011 - Adrian Stoian - System Center Configuration Manager 2012
ITCamp 2011 - Adrian Stoian - System Center Configuration Manager 2012ITCamp
 
ITCamp 2013 - Adrian Stoian - Whats new in ConfigMgr 2012 SP1
ITCamp 2013 - Adrian Stoian - Whats new in ConfigMgr 2012 SP1ITCamp 2013 - Adrian Stoian - Whats new in ConfigMgr 2012 SP1
ITCamp 2013 - Adrian Stoian - Whats new in ConfigMgr 2012 SP1ITCamp
 
ITCamp 2012 - Mihai Nadas - Tackling the single sign-on challenge
ITCamp 2012 - Mihai Nadas - Tackling the single sign-on challengeITCamp 2012 - Mihai Nadas - Tackling the single sign-on challenge
ITCamp 2012 - Mihai Nadas - Tackling the single sign-on challengeITCamp
 

En vedette (7)

ITCamp 2011 - Tudor Damian - Private Cloud, the Good, the Bad and the Ugly
ITCamp 2011 - Tudor Damian - Private Cloud, the Good, the Bad and the UglyITCamp 2011 - Tudor Damian - Private Cloud, the Good, the Bad and the Ugly
ITCamp 2011 - Tudor Damian - Private Cloud, the Good, the Bad and the Ugly
 
ITCamp 2011 - Mihai Tataran, Tudor Damian - Keynote
ITCamp 2011 - Mihai Tataran, Tudor Damian - KeynoteITCamp 2011 - Mihai Tataran, Tudor Damian - Keynote
ITCamp 2011 - Mihai Tataran, Tudor Damian - Keynote
 
ITCamp 2013 - Tiberiu Covaci & Sorin Stan - IASA Romania, what’s in it for me
ITCamp 2013 - Tiberiu Covaci & Sorin Stan - IASA Romania, what’s in it for meITCamp 2013 - Tiberiu Covaci & Sorin Stan - IASA Romania, what’s in it for me
ITCamp 2013 - Tiberiu Covaci & Sorin Stan - IASA Romania, what’s in it for me
 
ITCamp 2013 - Tobiasz Koprowski - 2AM A Disaster Just Began
ITCamp 2013 - Tobiasz Koprowski - 2AM A Disaster Just BeganITCamp 2013 - Tobiasz Koprowski - 2AM A Disaster Just Began
ITCamp 2013 - Tobiasz Koprowski - 2AM A Disaster Just Began
 
ITCamp 2011 - Adrian Stoian - System Center Configuration Manager 2012
ITCamp 2011 - Adrian Stoian - System Center Configuration Manager 2012ITCamp 2011 - Adrian Stoian - System Center Configuration Manager 2012
ITCamp 2011 - Adrian Stoian - System Center Configuration Manager 2012
 
ITCamp 2013 - Adrian Stoian - Whats new in ConfigMgr 2012 SP1
ITCamp 2013 - Adrian Stoian - Whats new in ConfigMgr 2012 SP1ITCamp 2013 - Adrian Stoian - Whats new in ConfigMgr 2012 SP1
ITCamp 2013 - Adrian Stoian - Whats new in ConfigMgr 2012 SP1
 
ITCamp 2012 - Mihai Nadas - Tackling the single sign-on challenge
ITCamp 2012 - Mihai Nadas - Tackling the single sign-on challengeITCamp 2012 - Mihai Nadas - Tackling the single sign-on challenge
ITCamp 2012 - Mihai Nadas - Tackling the single sign-on challenge
 

Similaire à ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs

Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An IntroductionBehzad Altaf
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Gitatishgoswami
 
Source Code Management with Git
Source Code Management with GitSource Code Management with Git
Source Code Management with GitThings Lab
 
Working in Team using Git in Unity
Working in Team using Git in UnityWorking in Team using Git in Unity
Working in Team using Git in UnityRifauddin Tsalitsy
 
Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3Asher Martin
 
Open up your platform with Open Source and GitHub
Open up your platform with Open Source and GitHubOpen up your platform with Open Source and GitHub
Open up your platform with Open Source and GitHubScott Graham
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github Max Claus Nunes
 
Bedjango talk about Git & GitHub
Bedjango talk about Git & GitHubBedjango talk about Git & GitHub
Bedjango talk about Git & GitHubBeDjango
 
Hackaton for health 2015 - Sharing the Code we Make
Hackaton for health 2015 - Sharing the Code we MakeHackaton for health 2015 - Sharing the Code we Make
Hackaton for health 2015 - Sharing the Code we Makeesben1962
 
IS - section 1 - modifiedFinal information system.pptx
IS - section 1 - modifiedFinal information system.pptxIS - section 1 - modifiedFinal information system.pptx
IS - section 1 - modifiedFinal information system.pptxNaglaaAbdelhady
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014biicode
 
Digital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meetingDigital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meetingHenry Schreiner
 
Git - Basic Crash Course
Git - Basic Crash CourseGit - Basic Crash Course
Git - Basic Crash CourseNilay Binjola
 
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and GithubWycliff1
 

Similaire à ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs (20)

Git
GitGit
Git
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An Introduction
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
3 Git
3 Git3 Git
3 Git
 
Git hub
Git hubGit hub
Git hub
 
Source Code Management with Git
Source Code Management with GitSource Code Management with Git
Source Code Management with Git
 
Git for Windows
Git for WindowsGit for Windows
Git for Windows
 
GitHub Event.pptx
GitHub Event.pptxGitHub Event.pptx
GitHub Event.pptx
 
Working in Team using Git in Unity
Working in Team using Git in UnityWorking in Team using Git in Unity
Working in Team using Git in Unity
 
Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3
 
Switching to Git
Switching to GitSwitching to Git
Switching to Git
 
Open up your platform with Open Source and GitHub
Open up your platform with Open Source and GitHubOpen up your platform with Open Source and GitHub
Open up your platform with Open Source and GitHub
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github
 
Bedjango talk about Git & GitHub
Bedjango talk about Git & GitHubBedjango talk about Git & GitHub
Bedjango talk about Git & GitHub
 
Hackaton for health 2015 - Sharing the Code we Make
Hackaton for health 2015 - Sharing the Code we MakeHackaton for health 2015 - Sharing the Code we Make
Hackaton for health 2015 - Sharing the Code we Make
 
IS - section 1 - modifiedFinal information system.pptx
IS - section 1 - modifiedFinal information system.pptxIS - section 1 - modifiedFinal information system.pptx
IS - section 1 - modifiedFinal information system.pptx
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
Digital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meetingDigital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meeting
 
Git - Basic Crash Course
Git - Basic Crash CourseGit - Basic Crash Course
Git - Basic Crash Course
 
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and Github
 

Plus de ITCamp

ITCamp 2019 - Stacey M. Jenkins - Protecting your company's data - By psychol...
ITCamp 2019 - Stacey M. Jenkins - Protecting your company's data - By psychol...ITCamp 2019 - Stacey M. Jenkins - Protecting your company's data - By psychol...
ITCamp 2019 - Stacey M. Jenkins - Protecting your company's data - By psychol...ITCamp
 
ITCamp 2019 - Silviu Niculita - Supercharge your AI efforts with the use of A...
ITCamp 2019 - Silviu Niculita - Supercharge your AI efforts with the use of A...ITCamp 2019 - Silviu Niculita - Supercharge your AI efforts with the use of A...
ITCamp 2019 - Silviu Niculita - Supercharge your AI efforts with the use of A...ITCamp
 
ITCamp 2019 - Peter Leeson - Managing Skills
ITCamp 2019 - Peter Leeson - Managing SkillsITCamp 2019 - Peter Leeson - Managing Skills
ITCamp 2019 - Peter Leeson - Managing SkillsITCamp
 
ITCamp 2019 - Mihai Tataran - Governing your Cloud Resources
ITCamp 2019 - Mihai Tataran - Governing your Cloud ResourcesITCamp 2019 - Mihai Tataran - Governing your Cloud Resources
ITCamp 2019 - Mihai Tataran - Governing your Cloud ResourcesITCamp
 
ITCamp 2019 - Ivana Milicic - Color - The Shadow Ruler of UX
ITCamp 2019 - Ivana Milicic - Color - The Shadow Ruler of UXITCamp 2019 - Ivana Milicic - Color - The Shadow Ruler of UX
ITCamp 2019 - Ivana Milicic - Color - The Shadow Ruler of UXITCamp
 
ITCamp 2019 - Florin Coros - Implementing Clean Architecture
ITCamp 2019 - Florin Coros - Implementing Clean ArchitectureITCamp 2019 - Florin Coros - Implementing Clean Architecture
ITCamp 2019 - Florin Coros - Implementing Clean ArchitectureITCamp
 
ITCamp 2019 - Florin Loghiade - Azure Kubernetes in Production - Field notes...
ITCamp 2019 - Florin Loghiade -  Azure Kubernetes in Production - Field notes...ITCamp 2019 - Florin Loghiade -  Azure Kubernetes in Production - Field notes...
ITCamp 2019 - Florin Loghiade - Azure Kubernetes in Production - Field notes...ITCamp
 
ITCamp 2019 - Florin Flestea - How 3rd Level support experience influenced m...
ITCamp 2019 - Florin Flestea -  How 3rd Level support experience influenced m...ITCamp 2019 - Florin Flestea -  How 3rd Level support experience influenced m...
ITCamp 2019 - Florin Flestea - How 3rd Level support experience influenced m...ITCamp
 
ITCamp 2019 - Emil Craciun - RoboRestaurant of the future powered by serverle...
ITCamp 2019 - Emil Craciun - RoboRestaurant of the future powered by serverle...ITCamp 2019 - Emil Craciun - RoboRestaurant of the future powered by serverle...
ITCamp 2019 - Emil Craciun - RoboRestaurant of the future powered by serverle...ITCamp
 
ITCamp 2019 - Eldert Grootenboer - Cloud Architecture Recipes for The Enterprise
ITCamp 2019 - Eldert Grootenboer - Cloud Architecture Recipes for The EnterpriseITCamp 2019 - Eldert Grootenboer - Cloud Architecture Recipes for The Enterprise
ITCamp 2019 - Eldert Grootenboer - Cloud Architecture Recipes for The EnterpriseITCamp
 
ITCamp 2019 - Cristiana Fernbach - Blockchain Legal Trends
ITCamp 2019 - Cristiana Fernbach - Blockchain Legal TrendsITCamp 2019 - Cristiana Fernbach - Blockchain Legal Trends
ITCamp 2019 - Cristiana Fernbach - Blockchain Legal TrendsITCamp
 
ITCamp 2019 - Andy Cross - Machine Learning with ML.NET and Azure Data Lake
ITCamp 2019 - Andy Cross - Machine Learning with ML.NET and Azure Data LakeITCamp 2019 - Andy Cross - Machine Learning with ML.NET and Azure Data Lake
ITCamp 2019 - Andy Cross - Machine Learning with ML.NET and Azure Data LakeITCamp
 
ITCamp 2019 - Andy Cross - Business Outcomes from AI
ITCamp 2019 - Andy Cross - Business Outcomes from AIITCamp 2019 - Andy Cross - Business Outcomes from AI
ITCamp 2019 - Andy Cross - Business Outcomes from AIITCamp
 
ITCamp 2019 - Andrea Saltarello - Modernise your app. The Cloud Story
ITCamp 2019 - Andrea Saltarello - Modernise your app. The Cloud StoryITCamp 2019 - Andrea Saltarello - Modernise your app. The Cloud Story
ITCamp 2019 - Andrea Saltarello - Modernise your app. The Cloud StoryITCamp
 
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...ITCamp
 
ITCamp 2019 - Alex Mang - I'm Confused Should I Orchestrate my Containers on ...
ITCamp 2019 - Alex Mang - I'm Confused Should I Orchestrate my Containers on ...ITCamp 2019 - Alex Mang - I'm Confused Should I Orchestrate my Containers on ...
ITCamp 2019 - Alex Mang - I'm Confused Should I Orchestrate my Containers on ...ITCamp
 
ITCamp 2019 - Alex Mang - How Far Can Serverless Actually Go Now
ITCamp 2019 - Alex Mang - How Far Can Serverless Actually Go NowITCamp 2019 - Alex Mang - How Far Can Serverless Actually Go Now
ITCamp 2019 - Alex Mang - How Far Can Serverless Actually Go NowITCamp
 
ITCamp 2019 - Peter Leeson - Vitruvian Quality
ITCamp 2019 - Peter Leeson - Vitruvian QualityITCamp 2019 - Peter Leeson - Vitruvian Quality
ITCamp 2019 - Peter Leeson - Vitruvian QualityITCamp
 
ITCamp 2018 - Ciprian Sorlea - Million Dollars Hello World Application
ITCamp 2018 - Ciprian Sorlea - Million Dollars Hello World ApplicationITCamp 2018 - Ciprian Sorlea - Million Dollars Hello World Application
ITCamp 2018 - Ciprian Sorlea - Million Dollars Hello World ApplicationITCamp
 
ITCamp 2018 - Ciprian Sorlea - Enterprise Architectures with TypeScript And F...
ITCamp 2018 - Ciprian Sorlea - Enterprise Architectures with TypeScript And F...ITCamp 2018 - Ciprian Sorlea - Enterprise Architectures with TypeScript And F...
ITCamp 2018 - Ciprian Sorlea - Enterprise Architectures with TypeScript And F...ITCamp
 

Plus de ITCamp (20)

ITCamp 2019 - Stacey M. Jenkins - Protecting your company's data - By psychol...
ITCamp 2019 - Stacey M. Jenkins - Protecting your company's data - By psychol...ITCamp 2019 - Stacey M. Jenkins - Protecting your company's data - By psychol...
ITCamp 2019 - Stacey M. Jenkins - Protecting your company's data - By psychol...
 
ITCamp 2019 - Silviu Niculita - Supercharge your AI efforts with the use of A...
ITCamp 2019 - Silviu Niculita - Supercharge your AI efforts with the use of A...ITCamp 2019 - Silviu Niculita - Supercharge your AI efforts with the use of A...
ITCamp 2019 - Silviu Niculita - Supercharge your AI efforts with the use of A...
 
ITCamp 2019 - Peter Leeson - Managing Skills
ITCamp 2019 - Peter Leeson - Managing SkillsITCamp 2019 - Peter Leeson - Managing Skills
ITCamp 2019 - Peter Leeson - Managing Skills
 
ITCamp 2019 - Mihai Tataran - Governing your Cloud Resources
ITCamp 2019 - Mihai Tataran - Governing your Cloud ResourcesITCamp 2019 - Mihai Tataran - Governing your Cloud Resources
ITCamp 2019 - Mihai Tataran - Governing your Cloud Resources
 
ITCamp 2019 - Ivana Milicic - Color - The Shadow Ruler of UX
ITCamp 2019 - Ivana Milicic - Color - The Shadow Ruler of UXITCamp 2019 - Ivana Milicic - Color - The Shadow Ruler of UX
ITCamp 2019 - Ivana Milicic - Color - The Shadow Ruler of UX
 
ITCamp 2019 - Florin Coros - Implementing Clean Architecture
ITCamp 2019 - Florin Coros - Implementing Clean ArchitectureITCamp 2019 - Florin Coros - Implementing Clean Architecture
ITCamp 2019 - Florin Coros - Implementing Clean Architecture
 
ITCamp 2019 - Florin Loghiade - Azure Kubernetes in Production - Field notes...
ITCamp 2019 - Florin Loghiade -  Azure Kubernetes in Production - Field notes...ITCamp 2019 - Florin Loghiade -  Azure Kubernetes in Production - Field notes...
ITCamp 2019 - Florin Loghiade - Azure Kubernetes in Production - Field notes...
 
ITCamp 2019 - Florin Flestea - How 3rd Level support experience influenced m...
ITCamp 2019 - Florin Flestea -  How 3rd Level support experience influenced m...ITCamp 2019 - Florin Flestea -  How 3rd Level support experience influenced m...
ITCamp 2019 - Florin Flestea - How 3rd Level support experience influenced m...
 
ITCamp 2019 - Emil Craciun - RoboRestaurant of the future powered by serverle...
ITCamp 2019 - Emil Craciun - RoboRestaurant of the future powered by serverle...ITCamp 2019 - Emil Craciun - RoboRestaurant of the future powered by serverle...
ITCamp 2019 - Emil Craciun - RoboRestaurant of the future powered by serverle...
 
ITCamp 2019 - Eldert Grootenboer - Cloud Architecture Recipes for The Enterprise
ITCamp 2019 - Eldert Grootenboer - Cloud Architecture Recipes for The EnterpriseITCamp 2019 - Eldert Grootenboer - Cloud Architecture Recipes for The Enterprise
ITCamp 2019 - Eldert Grootenboer - Cloud Architecture Recipes for The Enterprise
 
ITCamp 2019 - Cristiana Fernbach - Blockchain Legal Trends
ITCamp 2019 - Cristiana Fernbach - Blockchain Legal TrendsITCamp 2019 - Cristiana Fernbach - Blockchain Legal Trends
ITCamp 2019 - Cristiana Fernbach - Blockchain Legal Trends
 
ITCamp 2019 - Andy Cross - Machine Learning with ML.NET and Azure Data Lake
ITCamp 2019 - Andy Cross - Machine Learning with ML.NET and Azure Data LakeITCamp 2019 - Andy Cross - Machine Learning with ML.NET and Azure Data Lake
ITCamp 2019 - Andy Cross - Machine Learning with ML.NET and Azure Data Lake
 
ITCamp 2019 - Andy Cross - Business Outcomes from AI
ITCamp 2019 - Andy Cross - Business Outcomes from AIITCamp 2019 - Andy Cross - Business Outcomes from AI
ITCamp 2019 - Andy Cross - Business Outcomes from AI
 
ITCamp 2019 - Andrea Saltarello - Modernise your app. The Cloud Story
ITCamp 2019 - Andrea Saltarello - Modernise your app. The Cloud StoryITCamp 2019 - Andrea Saltarello - Modernise your app. The Cloud Story
ITCamp 2019 - Andrea Saltarello - Modernise your app. The Cloud Story
 
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...
 
ITCamp 2019 - Alex Mang - I'm Confused Should I Orchestrate my Containers on ...
ITCamp 2019 - Alex Mang - I'm Confused Should I Orchestrate my Containers on ...ITCamp 2019 - Alex Mang - I'm Confused Should I Orchestrate my Containers on ...
ITCamp 2019 - Alex Mang - I'm Confused Should I Orchestrate my Containers on ...
 
ITCamp 2019 - Alex Mang - How Far Can Serverless Actually Go Now
ITCamp 2019 - Alex Mang - How Far Can Serverless Actually Go NowITCamp 2019 - Alex Mang - How Far Can Serverless Actually Go Now
ITCamp 2019 - Alex Mang - How Far Can Serverless Actually Go Now
 
ITCamp 2019 - Peter Leeson - Vitruvian Quality
ITCamp 2019 - Peter Leeson - Vitruvian QualityITCamp 2019 - Peter Leeson - Vitruvian Quality
ITCamp 2019 - Peter Leeson - Vitruvian Quality
 
ITCamp 2018 - Ciprian Sorlea - Million Dollars Hello World Application
ITCamp 2018 - Ciprian Sorlea - Million Dollars Hello World ApplicationITCamp 2018 - Ciprian Sorlea - Million Dollars Hello World Application
ITCamp 2018 - Ciprian Sorlea - Million Dollars Hello World Application
 
ITCamp 2018 - Ciprian Sorlea - Enterprise Architectures with TypeScript And F...
ITCamp 2018 - Ciprian Sorlea - Enterprise Architectures with TypeScript And F...ITCamp 2018 - Ciprian Sorlea - Enterprise Architectures with TypeScript And F...
ITCamp 2018 - Ciprian Sorlea - Enterprise Architectures with TypeScript And F...
 

Dernier

Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 

Dernier (20)

Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 

ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs

  • 1. itcampro@ itcamp13# Premium conference on Microsoft technologies Git crash course for Visual Studio devs Alessandro Pilotti Cloudbase Solutions MVP ASP.Net / IIS @alexpilotti
  • 2. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & MobileHuge thanks to our sponsors!
  • 3. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • Why Git? • Basics • Visual Studio integration • Remote repositories • Branching • Merging and rebasing • Forks and github, bitbucket, etc • Continuous deployment • Gerrit • Azure support Agenda
  • 4. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • Why do we need an ENTIRE session on a VCS instead of talking about code?  • Previous VCS are so simple: – CVS – Subversion – Sourcesafe (D’oh) • In short, it’s because there’s way more than the usual commit / checkout thing  Why Git?
  • 5. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • Developed initially by Linus Torvalds in 2005 – Used for the Linux Kernel – GPLv2 – Multiplatform (Linux, Windows, OSX, FreeBSD) • Some design goals: – Fast and efficient – Support for non linear development – Distributed – Easy publishing – Garbage collection Git
  • 6. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • In most cases, you just start work on a project using it  – In my case, OpenStack • Most OSS projects are hosted on github – CodePlex supports Git as well • Ease to branch, merge, fork • Once you start using it, it’s hard to go back Why should I use it?
  • 7. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • http://msysgit.github.io/ – Command line • http://windows.github.com/ • Visual Studio 2012 Update 2 • NetBeans • Eclipse • TortoiseGit • etc Windows clients
  • 8. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • A Git repository is a directory tree containing your project(s) – A hidden directory “.git” contains all the Git stuff • Start a repo from scratch: – git init • Cloned from an existing repo: – git clone https://github.com/cloudbase/cloudbase-init Basics
  • 9. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • Files are either: – Staged (git knows about them) – Untracked (git doesn’t care about them) • To stage a file / directory: – git add path • To unstage and delete a file: – git rm path • To unstage w/o deleting it: – git rm –cached path Staging files
  • 10. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • As simple as: – git commit –a –m “Don’t forget the commit msg” • To commit a file: – git commit -m msg path • Being a distributed VCS, a commit is only local • Do small commits, atomic and cohesive – With a clear commit message – A VCS is not a backup tool  Commit
  • 11. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • You can look at the history for the current branch with a simple: – git log – git log --pretty=oneline • To see your staged (uncommitted) changes: – diff format – git diff • To see the differences between two commits: – git diff commit1 commit2 Git log, show and diff
  • 12. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • With checkout you can get a file or a working copy of your repository: – E.g.: to undo your work to the latest commit: – git checkout (entire repo) – git checkout file (single file only) • To checkout a file to a previous version: – git checkout commitref file – E.g.: to get the previous version: • git checkout HEAD^ file • git checkout HEAD^ checkout
  • 13. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • git config --global user.name ”My Name” • git config --global user.email myuser@mydomain.com • git config --global color.ui true • git config --global core.editor notepad++ – Note: add the editor to your path first (elevated console): • SETX PATH “%PATH%;%ProgramFiles% (x86)Notepad++” /M – Even better, getting used to vi is not so terrible  • git config --global core.autocrlf true – Values: true, input, false – Set true if you work on multiplatform projects – See .gitattributes later for this as well Global settings
  • 14. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & MobileGit and Visual Studio 2012
  • 15. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • VS 2012 Update 2 required • Install Visual Studio Tools for Git • Tools -> Options -> Source Control – Choose “Microsoft Git provider” • Open “Team Explorer” – View -> Team Explorer • You can use also regular git commands in – Package Manager Console Git and Visual Studio 2012
  • 16. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • Connect to Team Projects (socket icon) – Clone – Set the remote repo URL – Specify a local path VS 2012 Clone a repo
  • 17. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • RC available now • http://blogs.msdn.com/b/visualstudioalm/arc hive/2013/05/07/release-candidate-to-visual- studio-update-3-now-available.aspx • Bug fixes • Git TFS continuous integration support VS 2012 Update 3
  • 18. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & MobileVS2012 U3 Git
  • 19. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & MobileTFS + Git TFS supports GIT natively! http://bit.ly/Z1RkcV Signup for a free account here: https://tfs.app.visualstudio.com/_account/Signu p
  • 20. itcampro@ itcamp13# Premium conference on Microsoft technologies VS2012 GIT DEMO
  • 21. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • git contains all the info related to your repo in “.git/” • Your files (working copy), are simply a human readable copy of the files  – Bare repositories have no working copy • The Index contains info about staged files • File contents are stored into blobs • Other objects include trees (the filesystem refresentation) and commits • Every object is identified with a SHA1 hash A bit of internals
  • 22. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • You can refer to commits with their SHA1 hash or with a shorter unique prefix, e.g.: – git log e46bf2165f29f579051b8e12ebe63e5512205610 – git log e46bf2 • Or you can refer to a commit using a reference: – every branch has a “head” identifying the last commit • git checkout branchname Refs
  • 23. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • HEAD is a special symbolic link pointing to the head of the current branch • You can do some “arithmetic” with refs: – ^ points to the previous commit – ~n points to the nth previous commit – HEAD^^^ the 3rd commit before HEAD – HEAD~3 (same as the above example) • Note: use (quotes) “HEAD^” in the Windows cmd prompt Refs
  • 24. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • A tag is simply a friendly name for a commit – git tag v1.0 HEAD • Annotated tags are stored as full objects: – git tag –a v1.0 –m “Version 1.0” HEAD • Don’t confuse tags with a branches Tags
  • 25. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • Git is a distributed VCS • You can “sync” your local copy with remote copies anytime, by either “pull” or “push” changes • Git has no concept of a “server” – Repos form a peer network • It’s useful anyway to elect an “authoritative” repository. E.g.: – A repo on github, bitbucket, etc – The project lead developer’s repo Remote repositories
  • 26. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • A remote is simple a name and an url • List remotes: – git remote • Add a remote: – git add origin https://github.com/openstack/nova.git • Note: this will track all remote branches, use –t <branchname> to limit • Protocols to access the remote repo can be: – Local filesystem, HTTP/HTTPS, git, rsync – Local fileystem on Windows: • file:///c/your/path/repo.git Configuring remotes
  • 27. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • Remove a remote: – git remote rm name • Changing a remote url is a frequent operation: – git remote set-url <newurl> <remote_name> • Cleaning stale remote tracking branches – git remote prune <remote_name> Configuring remotes
  • 28. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • A bare repository doesn’t have a working copy of your content • Use it when you create an authoritative “server” repo • By convention bare repo folder names end it “.git” e.g.: “myrepo.git” • git init --bare Bare repositories
  • 29. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • A typical operation consists in cloning a remote repository (will set the proper remote as well): – git clone <url> • To update a local repository with remote commits: – git pull • This is a shortcut for git fetch and git merge FETCH_HEAD Clone / pull
  • 30. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • Updating a remote repository consists in: – git push <remote> <branch> – git push origin master • Note: you must first make sure that you pulled all the remote commits first! • More on merging / rebasing later! Push
  • 31. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • Git was created to make branching and merging as easy as possible. • “master” is the default branch • From an application lifecycle standpoint we can define two types of branches: – Long lived • Typically major releases – Short lived • Bug fixes, dev experiments, etc • Git makes no difference of course Branches
  • 32. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • Creating a branch is simply: – git chekout –b name – Shortcut for git branch name and git checkout name • Switch to a different branch: – git checkout name – This will also change the working directory contents to reflect the branch commits!! • To list existing branches: – git branch – The active branch is marked with “*” • To remove a branch: – git branch –d name Branches
  • 33. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & MobileHow does it look like? A B C Dmaster new-feature E F experiment master commits: A, B, D new-feature commits: A, B, C, E experiment commits : A, B, C, E, F
  • 34. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • In most cases at some point you’d like to merge the content of a branch into another • For example, you develop a new feature and once it’s done tested and reviewed you want to merge it in the master branch • git-merge merges a branch into the current one: – git checkout master – git merge new-feature Merge
  • 35. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & MobileHere’s how a merge looks like A B C Dmaster new-feature E F experiment G master commits: A, B, D, C, E, G
  • 36. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • What happens when the same file has been changed in two branches? • Git is very smart in applying different commit patches to the same source when lines do not overlap (e.g. 2 different methods) • But sometimes you just have to handle conflicts, it’s a hard life  Conflicts
  • 37. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile git merge branch_name CONFLICT (content): Merge conflict in test.txt Automatic merge failed; fix conflicts and then commit the result. D’oh! Edit the conflicting files… git add files git commit -a Conflicts
  • 38. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • You can also rollback the merge with: – git merge –abort • A merge happens also when you pull a remote branch – The resolution process is the same • Once the merge succeeds, you can delete the merged branch if you don’t need it anymore • You can also keep on working on the merged branch and merge it again later • When you merge a branch w/o conflicts (fast-forwarding) by default a merge commit is not created. This can be changed with git merge –no-ff etc Merge notes
  • 39. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • Rebasing a branch consists in taking the commits of another branch and applying them on the current branch before any commit added to the current branch. • Typically this is used to bring a local branch up to date with remote commits • Merge vs rebase can create a bit of confusion to users Rebase
  • 40. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & MobileRebase example A B C Dmaster new-feature E F git checkout new-feature git rebase master Note: rebased commits have a new hash!
  • 41. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile CONFLICT (content): Merge conflict in test3.txt Failed to merge in the changes. Patch failed at 0002 asdasdd The copy of the patch that failed is found in: /Users/anorex/Downloads/testgit/.git/rebase-apply/patch When you have resolved this problem, run "git rebase --continue". If you prefer to skip this patch, run "git rebase --skip" instead. To check out the original branch and stop rebasing, run "git rebase - -abort". Rebase conflicts • Similar to resolving a merge
  • 42. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • What if you just one to pick a single commit from another branch without having to merge / rebase the entire branch? • E.g. backporting a bug fix from v1.2 to v1.1 • git cherry-pick commit1 • git cherry-pick start..end Cherry picking
  • 43. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & MobileCherry-pick example A B C Dmaster new-feature E F D ’ git checkout new-feature git cherry-pick D Note: cherry-picked commits have a new hash!
  • 44. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • Sometimes you might need to remove or reorder commits (locally only don’t do that after a push!) • This can be done interactively with git rebase: • git rebase –i “HEAD~4” • Just remove or reorder the lines in the editor: – pick 37c449c My first commit – pick 3982180 My second commit – pick 6055a10 My last commit Reordering and removing commits
  • 45. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • There’s a good chance that your dev branch commits will be a mess  • Git gives you a chance to clean them up before pushing them upstream using git rebase, e.g.: • git rebase –i HEAD~3 – pick 37c449c My first commit – squash 3982180 My second commit – squash 6055a10 My last commit Squashing
  • 46. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • Changing the content of the last commit is a frequent action: – Typos – Missing files – Errors discovered after committing • Just add --amend to the commit command: • git commit –a --amend Change the last commit
  • 47. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • Sometimes you might need to revert a commit • Removing a commit is in general a bad idea unless the commit appear only locally, so reverting is a good alternative • git revert <commit> • This action will generate a new commit Revert
  • 48. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • There are cases in which the only way to get out of a messy local repository is to restore it to a previous state • git reset --soft <commit> – Doesn’t modify index and working dir • git reset --mixed <commit> – Modifies the index but not the working dir • git reset --hard <commit> – Modifies the index AND the working dir git reset
  • 49. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • .gitignore is a special file in your repository that contains rules for files and folders that will not be tracked • Example: *.exe *.dll *.obj *.pdb .gitignore
  • 50. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • On Window you might want to deal with CRLF / LF on a per-project base • in .gitattributes add: • text eol=lf .gitattributes
  • 51. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • Git provides support for SVN repositories as well • There’s quite a lot to discuss on the subject • Just as an introduction: • git svn clone <svn_url> <repo.git> • git svn fetch • git svn dcommit Git and Subversion
  • 52. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • Hooks let you run custom code on given events • E.g.: for push events: – pre-receive hook – for each update ref: • update hook • update ref – post-receive hook – post-update hook Hooks
  • 53. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • Hooks are scripts stored in .git/hooks/ • Each script has the name of the hook – Must be executable (Unix) • Parameters are passed in the command line • On Windows, you can use Powershell – But you need a MSYS script (sh, bash, etc) #!/bin/bash powershell -executionpolicy RemoteSigned - File C:pathpost-receive.ps1 "$@" < /dev/stdin Writing hooks
  • 54. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile function ProcessRef($old, $new, $ref) { "old {0} new {1} ref {2}" -f ($old, $new, $ref) | Out-File -append ”C:Testpost-receive.txt" } $lines = while(($line=[Console]::ReadLine())){$line} foreach($line in $lines) { $values = $line.Split(" ") $old = $values[0] $new = $values[1] $ref = $values[2] ProcessRef $old $new $ref } Example Powershell post-receive
  • 55. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • Github did a tremendous job in popularizing Git, becoming currently the “de facto” standard platform for open source projects • Very intuitive and rich web interface • Fork and pull requests • Rich APIs for continuous deployment and more • BitBucket offers similar services, including a limited number of free private repos Github, Bitbucket & co.
  • 56. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & MobileFork
  • 57. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • Anybody can fork a public repo • Users with proper access can fork a private one • In Github, forks are a good thing • After committing code to your fork, you can send a “pull request” to the maintainer of the original repository • The maintainer can review it, approve and merge it Fork and pull requests
  • 58. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • A modern application lifecycle management needs to consider a proper framework for: – Code review – Unit testing – Continuous integration • Integration system tests – Continuous deployment • Optionally / Ideally • Git’s distributed nature helps a lot Code review, unit testing and CI
  • 59. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • Gerrit is an open source code review solution based on Git – https://code.google.com/p/gerrit/ • Written in Java • Multiplatform Gerrit
  • 60. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & MobileGerrit
  • 61. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • Git provides a very easy model to extend the existing command set • git review is the extension provide for Gerrit integration – https://pypi.python.org/pypi/git-review – Requires Python • Install on Windows with: – easy_install.exe git-review Git review workflow
  • 62. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • git checkout -b newbranch • git review -s • git commit -a • git-review • Your commits is now available for review on the Gerrit web site • Jenkins and CI tools can be executed and vote • Human review and approval occurs • Jenkins and CI tools can be executed again • The commits merge into the master branch • New versions of the same patchset can be sent with: • git commit -a --amend • git review Gerrit workflow
  • 63. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & MobileGit and Azure web sites
  • 64. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & MobileGit and Azure web sites
  • 65. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • Integrate Powershell with Git? • http://www.hanselman.com/blog/PromptsAn dDirectoriesEvenBetterGitAndMercurialWithP owerShell.aspx Posh-Git
  • 66. itcampro@ itcamp13# Premium conference on Microsoft technologies Q & A