Jake Ginnivan Git for TFS Version Control developers DEV32 4
VCS MS work here and here
Team Foundation Server/Service Project 2Project 1 3 rd Party Local Repo Other Remote Git Repo
[Changeset 2] [Changeset 3] [Changeset 2] Changeset 3 Changeset 1 Changeset 2 Get latest (Changeset 3) [Changeset 3]
Changeset 3 Changeset 1 Changeset 2 75c8b5 3a6f61 6a286b How are commit IDs generated? Can’t be monotonically increasing without a server to arbitrate A cryptographic hash (SHA1) of the contents of the commit
75c8b5 3a6f61 6a286b 75c8b5 3a6f61 6a286b 8c62e8 087f8d 8c62e8 087f8d *Clone* 75c8b5 3a6f61 6a286b 8c62e8 087f8d 10d3f74 *Fetch* 10d3f74 *Push*
Git commits are a snapshot of the content TFVC change sets are deltas of the changes to the content
Changeset 2 -Some description +A better description 3 3a6f61 # My readme Some description b3af9c # My readme A better description Changeset 2 # My readme Some description 1
Renames Git does not track renames Commits are a snapshot of the entire repository No additional metadata about deltas between commits Git guesses renames Compare deleted files to added files Similar files are deemed “renames” Heuristic approach to renames is more accurate than relying on user input.
75c8b5 3a6f61 6a286b 8c62e8 087f8d 10d3f74 master feature/foo $Ignite Main C:\Workspaces\Ignite Branches FeatureFoo C:\Workspaces\Ignite\Main C:\Workspaces\Ignite\Branches\FeatureFoo C:\Code\IgniteGitRepo HEAD
master origin/master
master origin/master
master origin/master
master origin/master
> git pull master
Pull requests
master origin/master feature/foo
master origin/master feature/foo
master origin/master feature/foo
master origin/master feature/foo
master origin/master
> git pull master --rebase
master Merge master Rebase
master > git reset HEAD~4 --hard
> git reflog aef1ebc reset: moving to HEAD~4 4efbd1e commit: commit7 a commit: commit6 ba16220 commit: commit5 004e6a3 commit: commit4 aef1ebc commit: commit3 4c86bab commit: commit b commit: commit1 f57c13d commit (initial): initial commit
ShelfsetStash LabelTag Gated Checkin File Lock Checkin policy Bisect Interactive rebase
git-scm.com/download/win or choco install git.install git config --global user.name "Jake Ginnivan" git config --global user.
Continue your Ignite learning path Visit Microsoft Virtual Academy for free online training visit Visit Channel 9 to access a wide range of Microsoft training and event recordings Head to the TechNet Eval Centre to download trials of the latest Microsoft products