Scientific workflows: Tools and Tips 🛠️
2025-07-17
📅 Every 3rd Thursday 🕓 4-5 p.m. 📍 Webex
Git is like a Lab Notebook for your scripts
Open source and free to use version control software
Quasi standard for software development
Complete and long-term history of every file in your project
A whole universe of other software and services around it
For projects with mainly text files (e.g. code, markdown files, …)
Basic idea: Take snapshots (commits) of your project over time
Git is a distributed version control system
Idea: many local repositories synced via one remote repo
After you installed it there are different ways to interact with the software.
Using Git from the terminal
➕ Most control
➕ A lot of help/answers online
➖ You need to use terminal 😱
A Git GUI is integrated in most (all?) IDEs, e.g. R Studio, VS Code
➕ Easy and intuitive
➕ Stay inside IDE
➖ Different for every program
Standalone Git GUI software, e.g. GitHub Desktop, Source Tree, …
➕ Easy and intuitive
➕ Use for all projects
➖ Switch programs to use Git
Tip
Have a look here to find How-To guides for the other methods as well.
git init
,git add
,git commit
,git push
A cook book project to collect all my favorite recipes.
In real life this would be e.g. a data analysis project, your thesis in LaTex, a software project, …
Git detects any changes in the working directory
Staging a file means to list it for the next commit.
Staging a file means to list it for the next commit.
Commits are the snapshots of your project state
Commits are the snapshots of your project state
Changes are part of Git history and staging area is clear again
Good commit messages are descriptive and helpful.
✔️
See here for more details on good commit messages.
Use remote repos (on a server) to backup, synchronize, share and collaborate
Use remote repos (on a server) to backup, synchronize, share and collaborate
Basic Git workflow:
Basic Git workflow:
Git is a distributed version control system
In Git language, this is called cloning
You can clone all public repositories and private repositories if you are a owner/collaborator
In Git language, this is called cloning
You can clone all public repositories and private repositories if you are a owner/collaborator
git push
git pull
If you are interested, browse some nice GitHub repositories for inspiration (e.g. Git training repository, Computational notebooks, Repo to publish code from a manuscript)
Summer/Conference break in August and September!
📅 16th October 🕓 4-5 p.m. 📍 Webex
🔔 Subscribe to the mailing list
📧 For topic suggestions and/or feedback send me an email
Questions?
git init
: Initialize a git repository
.git
folder to your working directorygit add
: Add files to the staging area
git commit
: Take a snapshot of your current project version
git push
: Push new commits to the remote repository
git revert
git revert
to revert specific commits
git checkout
Take your work space back in time temporarily with git checkout
.gitignore
.gitignore
.gitignore
Create a file with the name .gitignore
in working directory
Add all files and directories you want to ignore to the .gitignore
file
*.html # ignore all .html files
*.pdf # ignore all .pdf files
debug.log # ignore the file debug.log
build/ # ignore all files in subdirectory build
See here for more ignore patterns that you can use.
Selina Baldauf // Version control with Git