git

Installation

To install TortoiseGit, first install Git separately.

Proxy

Setting proxy server for Git - see here. Setting environment variables http_proxy and https_proxy worked for me.

Resources

git-svn

Git can be used as an SVN client.

The easiest way to checkout an SVN repository is to use TortoiseGit. There is an option to clone a repository from SVN.

If you are using authenticated repositories, simply add your username to the repository URL in the form

http://user@server/svn/repository

If you prefer to do it manually, follow the instructions below.

To prepare for checking out the SVN repository first create a folder on the local machine into which the repository will be checked out (i.e. C:\SVN\Documentation).

Start a Git Bash in the created directory. To checkout an SVN repository use the following commands:

git svn init <path to repo>
git svn fetch

This will checkout the SVN repository to the current directory.

Useful parameters that can be used are

"-T" indicates that the checkout is from trunk;

"-t" indicates that the checkout is from tags directory;

"-b" indicates that the checkout is from branches directory;

"-s" indicates that the repository follows standard layout.

Once you are done with changes, do the following:

Synchronize your repository with SVN repository (effectively, this is SVN update)

git svn rebase

Then commit your changes to the SVN repository with

git svn dcommit

Git-TFS

List of commands (link). Project page (link).

To install, pull the repository from Github, run "msbuild GitTfs.sln /p:Configuration=Vs2010_Debug" to build, then add the build output path (bin\debug) to the PATH environmental variable.

    • Clone (check-out a project)

Quick Clone just checks out the tip revision:

git tfs quick-clone http://tfs:8080/tfs/DefaultCollection $/some_project

full clone gives you the whole history of the branch:

git tfs clone http://tfs:8080/tfs/DefaultCollection $/some_project
    • Update from TFS
git tfs fetch
git rebase tfs/default

set alias in .gitconfig

[alias]
tpull = !git tfs fetch && git rebase tfs/default
    • Check-in to TFS visually
git tfs checkintool

and check-in in console:

git tfs checkin

Notes:Set ignore settings in ".git/info/exclude" instead of creating .gitignore file.

Resources:

Git Cheat Sheet (link)