FAQ

FAQ#

How to work with Git at Eawag?

The most widespread modern version control system on the planet today is Git. Originally developed in 2005 by Linus Torvalds, the famous creator of the Linux operating system kernel, Git is a mature, actively maintained open source project. Do not confuse Git with GitHub/GitLab/… the latter are platforms for managing Git repositories.

Tip

It is quite easy to keep an automatically synchronized copy on Eawag internal storage:

  1. Create a “bare” repository in a backed-up location, e.g.

    git init --bare path/to/secure/location/myrepo.git
    
  2. Usually, the name of the “remote” at the web-service is “origin” (automatically assigned if you clone a repository, say, from GitHub). Set a “pushurl” for “origin” to both, the GitHub URL and to your secure local copy, e.g.:

    git remote set-url --add --push origin https://github.com/username/myrepo.git
    git remote set-url --add --push origin path/to/secure/location/myrepo.git
    

Now, each time you “push” your repository, both the one at GitHub and the local one are updated. And don’t worry, the commands above are way more complicated than anything you’d ever use in day-to-day work.