Git and Bitbucket

Git is a version control system that you will be using to manage your lab projects.

You will receive an email "invitation" for a git repository on Bitbucket.

If you don't yet have a Bitbucket account, create one through the link in the email.

Follow the two tutorials from Bitbucket:

Online Book/PDF

Ssh key

To avoid having to enter your bitbucket password every time you access the remote repository, you create an SSH key pair.

To create an SSH key pair, login to your Linux account and create an SSH key pair with the command:

      ssh-keygen
    

This creates a subdirectory .ssh of your login directory and files: id_rsa and id_rsa.pub

Upload (copy and paste) your public key from the id_rsa.pub file (not the private id_rsa) into your Bitbucket account. (Can do this later if you want to skip it for now.)

Clone the Repository

A repository was created by the instructor, but giving you write permission. The name of the repository will show up in Bitbucket as: csc374w2015/[...]-374.git, where [...] is your Linux login.

Clone this repository. In BitBucket click the "clone" button and copy either the ssh command (if you have already copied ssh keys into Bitbucket) or the https command and paste it at the Linux prompt. E.g.

      git clone git@bitbucket.org:csc374w2015:[...]-374.git

    

or

      git clone https://[...]@bitbucket.org/374w2015/[...]-374.git
    

where the name of the repository [...] will be your login.

This will create a directory for the repository, but it will initially be empty - no files.

Change to this directory and create a subdirectory, lab1, for the shell lab files.

Getting the shell lab files into your repository.

The shell lab files need to be in your repository directory so that they can managed by git and easily be uploaded (submitted). I suggest putting them in the lab1 subdirectory of your repository.

To do this, use one of the following: