Git

Git

Software

  • Git - the git engine which has a commandline interface
  • TortoiseGit - windows shell integration for git (right-click-menus & icon overlays)
  • GitExtensions - a GUI for Git that is nice to use http://gitextensions.github.io/. Download the portable version... no installation necessary!
  • Sourcetree - a GUI developed by Atlassian

Sourcetree Installation Instruction 

Step 1

Download the installer.

For me it was "SourceTreeSetup-3.1.3.exe" and I got it from this address https://product-downloads.atlassian.com/software/sourcetree/windows/ga/SourceTreeSetup-3.1.3.exe

Step 2

Kill whitelisting and then run the installer.

Step 3 

During installation it will ask you to register the software with BitBucket. Go ahead and do that. This linked the software to my Bitbucket account chas.egan@des.qld.gov.au. I was already logged in through my browser, so I didn't have to provide a password.

Step 4

In the next step it detected that I had both GIT and HG installed. 

I decided to add automatic line ending handling. 

Step 5

I chose to set global author details for Git and Mecurial, as I use the same ones for all my work stuff. 

Step 6

Okay, so at the time of installation I didn't have a SSH key. So I clicked "No". 

(Update: I have been using Sourcetree and have not yet manually created a SSH key, so I'm not sure how it's working or whether it's necessary).

Setting the Remote Server in SourceTree

Step 1

This assumes you already have a local Git repository with some stuff in it (one or more commits), and a remote repository already set up on Bitbucket ready to push to. Copy the clone command from Bitbucket - in this case it was "git clone https://cegan@bitbucket.org/cegan/test1.git"

Step 2

Repository > Add Remote > Add

Step 3

Fill out the details. Here I ticked "Default remote" to use the default remote name which is "origin". I filled out the URL with the one copied from the clone command on BitBucket. This URL included my username... but that didn't seem to hurt. And I chose my remote account "cegan" on BitBucket, which I guess was set up when I registered SourceTree. Easy. Press OK.

Step 4

Now back at the main Window I can push from my local copy to origin by pressing "Push", and then in the pop-up window selecting what branches I want to push.