Thursday, September 21, 2017

Git cloning

A previous post described how to create a repository for the first time.  If your repository has been pushed to a remote repository, such as on Assembla, you will need to clone the repository to pull it down to your local PC.  This is pretty simple (at least with Assembla).

  • If you don't already have a folder where you keep all your git projects, the create one.
  • Open up Git Bash.
  • cd to the folder (using double slashes) like so:  
cd c:\\gitprojects
  • Sign into the Assembla site.
  • Select your git project.
  • Choose the Git menu option.
  • In the upper right corner, you'll see a drop down arrow next to the word Clone.
  • Clicking on the drop down will reveal a box with three options.
  • Choose HTTPS, and copy the URL that appears in the box.
Then, back in Git Bash, type:

git clone http://git.assembla.com/NAMEOFPROJECT.git

Notice, that I typed http instead of https. If you choose https, you have to do some additional configuration with a certificate, that can get a little hairy. I have found that for my purposes I don't need the encryption of https.