Using Bitbucket on Windows using TortoiseGit
Jun 11, 2013 · 2 minute readCategory: Windowsmagentogit
Install TortoiseGit
TortoiseGit is a Windows GIU for using Git on Windows, integrating nicely with Windows Explorer.
Download TortoiseGit and install it.
Install and set up PuTTYgen
PuTTYgen is a program used to create SSH keys on Windows, the Public-Private-Key encryption used by SSH in place of passwords, you’ll need these to authenticate with Bitbucket.
Download PuTTYgen and install it.
Once installed, you’ll need to set up a public and private key. Open PuTTYgen from your Start menu/screen and follow the instructions on the screen. Once you’ve generate the key, save both the Prive and Public keys to your computer.
Add your keys to Bitbucket
- Log in to Bitbucket navigate to Manage Account > SSH Keys > Add Key
- Right-click your public key file and open in a text editor
- Remove the lines beginning with -- and the Comment line
- Remove any remaining line breaks
- Prepend the key with "ssh-rsa " - including the space
- Paste this into the Key field
Clone the repository
- Right-click a folder in Explorer > Git Clone
- Copy the repository access from the Repository's main page, on the right next to the SSH button
- Paste this into the URL field of TortoiseGit
- Tick Load Putty Key, and add your Private key from PuTTYgen
Switching Branches
- Enter your local repository's folder
- Right-click an empty space > TortoiseGit > Switch/Checkout...
- Select your branch from the dropdown
Committing changes
- Right-click an empty space
- Click Git Commit -> "branchname"
- Add a commit message
When you’re ready to push your changes to Bitbucket
- Right-click an empty space
- Click TortoiseGit > Push...