Git Quick Guide

Our lab uses to host most of the project source codes in private repositories. Here are very quick guides from without git knowledge. Note there is no difference in use of gitlab or github. You use the same software system, except you specify different repo in the url.

Install Git in Windows

  1. Create an account at if you haven’t.
  2. Install Git for Windows.
  3. Add user. See “Configure Git” in this webpage:
  4. Add SSH key to your gitlab profile. Follow this guide:
  5. Now you can right click in any folder and select “Git Bash Here” to use git in this folder

Clone Project

  1. Go to the project page on
  2. Click the blue “Clone” button.
  3. Copy the “Clone with SSH” link, e.g.
  4. Navigate to the root of your workspace folder in your computer. The cloned project will be a sub folder in here. This workspace can have your different projects in different sub-folders.
  5. Right click and select “Git Bash Here”.
  6. Enter git clone followed by the project SSH link, e.g. git clone
  7. You should see the project being downloaded to your computer.
  8. May be helpful:

Useful References

  1. Workflow:
  2. Tutorial:
  3. Each time you want to push your changes:
    • Add new files to git: git add filename or git add *.
    • Commit changes to git: git commit -m "Commit message".
    • Push changes to remote: git push origin master or simply git push if you are not working with branches.
  4. Other useful commands:
    • To check all branches local and remote: git branch -a.
    • To pull changes from remote: git pull.
  5. Below are the slides prepared by Amran:
    [gview file=””]