Skip to content

Preparation for Week 2: Git & GitHub

View on GitHub

In the second week of our Quantum Software Development Journey: From Theory to Application with Classiq workshop series, we will delve into Git & GitHub. Proficiency in Git & GitHub is essential for collaborative software development, applicable across various domains including classical and quantum software development, as well as open-source projects.

This document outlines the mandatory preparation required before the workshop.

Please note - We will not cover Git installation and basic setup during the workshop itself. Completing this preparation will enable you to quickly grasp the fundamental concepts of Git & GitHub within our limited timeframe.

Installation & Registration

  1. Install Git:

  2. If you do not have Git installed or are unsure if it's installed, please follow this guide: Install Git.

  3. Note: Git is pre-installed on most macOS and Linux systems.

  4. Register on GitHub:

  5. If you do not have a GitHub account, create one at GitHub.

  6. Install GitHub Desktop:

  7. If GitHub Desktop is not installed on your computer, download and install it from GitHub Desktop.

  8. Note1: GitHub Desktop is available for Windows and macOS. If you are using Linux, you can manage your GitHub repositories using the command line or other GUI tools like GitKraken or Sublime Merge (these will not be covered in the workshop).

  9. Note2: If you are experienced with Git & GitHub and you are used to working from the command line only, without GitHub Desktop, you can skip the installation and follow the following steps directly using the command line.

Take your time to carefully follow these steps to ensure you are fully prepared for the upcoming workshop.

Well Done - Now we are set up for collaboration and contribution!

Getting Started with Cloning and Forking

During the workshop, we will delve into key GitHub terms, such as "Fork," "Clone," "Push," "Pull Request," and "Commit."

Understanding the Basics:

  • Repository: a fancy name for 'folder'

  • Clone: Creates a local copy of a repository on your computer.

  • Fork: An online copy of a repository that allows you to freely make changes without affecting the original project. This copy is hosted under your own GitHub account, enabling you to propose changes through pull requests.

Practical Exercise: For our practical exercises, we will both clone and fork the Classiq Library. Each participant will:

  • Fork: Maintain a personal remote version under their own GitHub account.

  • Clone: Have a local copy of the library to work on.

Starting Steps: To begin, visit the Classiq Library page and click the Fork button in the upper right corner (as indicated in the image).

Screen Shot 2024-05-01 at 11.42.00.png

Great! Now you have your own copy of the Classiq Library under your GitHub account!

Next, we wish to Clone this repository, which means creating a local copy on your computer. This allows you to work offline and later push updates back to your GitHub version.

Important: Make sure to clone the copy in your account. The repository path in the upper left should show '<-your username->/classiq-library' and not 'Classiq/classiq-library', because we need to clone the repository we have just forked.

Once confirmed, click Code and then select Open with GitHub Desktop.

Screen Shot 2024-05-02 at 11.12.57.png

After you select 'Open with GitHub Desktop,' the GitHub Desktop application will pop up. You will be prompted to choose the location where the repository will be saved on your local computer. Be sure not to change the URL address. While this process can also be performed using the command line, using GitHub Desktop is more straightforward and user-friendly, assuming no prior experience.

Well done! Now, we have a local folder named 'classiq-library' in the directory you chose. This folder is often referred to as a repository. We are now ready to code and update the fork we have created.

In the workshop, we will go into more details on how and why we do this! See you soon!

If you'd like, read more here to get familiar with basic Git commands.