Git Quick Reference

GIT Full Path

"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\cmd\git.exe"

Clone a Repo

git clone https://github.com/AcmeCompany/MyRepo.git

List Outgoing Commits

This command sends the output to the file "c:\data\diff.txt"

git log origin/DEPLOY..HEAD > c:\data\diff.txt

Branches

List Branches

git branch

Create Local Branch, And Pull Code from Remote

git checkout MyBranch

Show Current Branch

git branch --show-current

Discard Changes

git reset --hard