Prerequisites
Create a space and make sure you have a Git repository added to your space. If you do not have it, you can easily add it by going to your Admin tab > Tools and then clicking on the "add" button next to the Git tool.
Starting from Scratch?
Install Git on your machine. To find out if you already have Git installed on your machine, open a terminal and copy paste the command below:
Install and Configure your Git repository on your OS X
git --version
If you get a version number in response, that means you have Git already installed. You could skip the 'Install Git on your machine' steps and start configuring your username and email address. If you do not get a response, you will need to install git. Please follow the instructions below.
Install Git on your machine
Download the Git for OS X installer (DMG file) here.
Once you have successfully downloaded the installer, open the DMG file and double-click on the PKG file to install it.
3. Follow the installation wizard to complete the installation
Configure your username and email address
1. Open a terminal and configure your username and user email address. Copy & paste the code below; be sure to replace "Your Name" and "your_email@assembla.com" with your own name and email address.
git config --global user.name "Your Name"
git config --global user.email "your_email@assembla.com"
2. Do NOT keep the quotation marks around your name and email when putting them into the terminal
Generate and upload your SSH key
Generate a new SSH key
1. From Terminal, run this command:
ssh-keygen -t rsa -C "your_email@assembla.com"
Note: This email should match the email you set up in the previous step
2. You will be prompted to give the key a filename. You can accept the default name by simply hitting Enter.
3. You will also be asked for a passphrase. You can skip this by hitting Enter.
Copy public key (id_rsa.pub) into your Assembla Profile:
The key will be in the ~/.ssh hidden directory.
Open the public key file (the default name is id_rsa.pub) in a text editor (Word, Notes, etc.) and select all and copy.
Log in to your Assembla account. Go to Profile -> Manage SSH keys and add/paste the key.
Start using Git
Go to your project's Git page
If you are joining an existing space: Clone the repository.
Copy & paste the instructions into your terminal, but make sure you replace "space-name-here" with your space name (replace spaces with dashes).
git clone git@git.assembla.com:space-name-here.git
3. If you want to push your Git tracked local directory to your empty Assembla Git repository: Push your code to the repository.
Add a remote pointer to the repository. Make sure you replace "space-name-here" with your space name (replace spaces with dashes).git remote add origin git@git.assembla.com:space-name-here.git
git remote add origin git@git.assembla.com:space-name-here.git
Start using it to push code
git push origin master
Ex:
Tip: Rename your Git repository before checking it out. In your Assembla Space, go to Git Settings and update your repository tab Title and Repo Name to change your Git tab and repository url to easily identifiable names.