Skip to content

Welcome!

This tutorial is designed to give you practical, hands-on experience with Git.

Git is the foundation used by many development platforms and workflows. In this guide, we demonstrate Git concepts with GitHub, but the same ideas also apply to other interfaces such as GitLab and Bitbucket.

You can complete most beginner tasks directly in your browser, so installing Git is not required to get started. As you progress, we also introduce the command line and show both approaches side by side, so you can choose the workflow that suits you best.

With this tutorial our goal is to help standardize Git best practices across Empa.

After completing this tutorial you will be able to address scenarios that are common in our teams:

1. Managing shared group scripts centrally

Section titled “1. Managing shared group scripts centrally”

Your group has multiple scripts developed over time, and you want to manage them in a central place by creating repositories, structuring ownership, and controlling access.

You will learn to:

  • create repositories with a clear purpose and structure
  • define who can read, write, and administer each repository
  • collaborate safely using branches and pull requests

You created a script for data evaluation and want to publish it openly with your paper. The repository should be public and reusable, while direct changes remain restricted to maintainers.

You will learn to:

  • set the repository visibility to public
  • protect the main branch and control direct edits
  • include essential files for reuse (README, license, citation info)

3. Using Git for personal version control from a local machine

Section titled “3. Using Git for personal version control from a local machine”

You are writing a data-evaluation script locally and want to track its history with Git while keeping a remote copy on GitHub.

You will learn to:

  • initialize Git locally and make meaningful commits
  • connect a local project to a remote repository
  • push updates and keep local/remote versions in sync