From 387430c2f6639f0ee96d9a624ad050cc4e408abc Mon Sep 17 00:00:00 2001 From: Tiziano Zito Date: Thu, 22 Aug 2024 11:39:40 +0200 Subject: [PATCH] lecture notes will follow after the lecture --- README.md | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 2e4865a..2f2416d 100644 --- a/README.md +++ b/README.md @@ -13,33 +13,9 @@ — Lars Wirzenius (Linux kernel developer) -## Warm-Up -- how to start a repo from scratch? - - `git init` local method - - on an online forge (GitHub, GitLab, …): `git clone` -- how to revert mistakes? - - before commit: - - `git restore ` [discard changes in the working directory] __changes files__ - - `git restore --staged ` [unstage changes ➔ opposite of `git add `, does not modify the working directory] - - after commit: - - `git revert ` [creates a new commit, modifies the working directory] - - `git reset ` [only reset the HEAD pointer, does not modify the working directory] __rewrites history__ ➔ can not be used if you have already pushed to some remote - - `git reset --hard ` [reset HEAD and modify working directory] __rewrites history__ and __changes files__ ➔ can not be used if you have already pushed to some remote -- how to *move* the whole working directory to a specific point in history? - - `git checkout ` ➔ `DETACHED HEAD` problem, __changes__ __files__ - - interaction with branches: `git branch ` + `git switch ` -- how to copy a file from a different branch: - - `git checkout ` ➔ the file is staged automatically - - `git restore --source= `, `git push `, `git fetch `, `git merge ` -- GitHub: forks, branches and PRs: important ➔ explain fork vs. clone!!! -- strategies for keeping your fork up-to-date: your `main`, origin's and upstream's `main`, short-lived and long-lived topic branches -- a more thorough and detailed explanation can be found on the [SciPy Contributor's Guide](https://docs.scipy.org/doc/scipy/dev/gitwash/gitwash.html). This guide can be adapted to your own needs, see [gitwash](https://github.com/matthew-brett/gitwash). -- make it clear that GitHub and GitLab are just options (git≠GitHub) +… will follow after the lecture … ## Scenarios 1. [lone scientist](scenarios/scenario1.png) working alone in the cellar without Internet (local git)