diff --git a/01_version_control/git_basics_demo.md b/01_version_control/git_basics_demo.md index 62f59ed0..1fe46bdb 100644 --- a/01_version_control/git_basics_demo.md +++ b/01_version_control/git_basics_demo.md @@ -23,7 +23,7 @@ - many more - often, more than just hosting, also DevOps -- Give outlook on remainder of Git chapter: *How I work with Git*, quiz, advanced topics (workflows, rebase, standards), *my neat little Git trick* +- Give outlook on remainder of Git chapter: *How I work with Git*, *my neat little Git trick*, advanced topics (workflows, rebase, standards) ## How I work with Git @@ -82,10 +82,10 @@ Starting remarks: - have a look at an existing PR, look at all tabs, show suggestion feature - but sometimes we want to really build and try sth out ... - `git remote -v` - - `git remote add alex git@github.com:ajaust/precice.git` if I don't have remote already (or somebody else) - - `git fetch alex` - - `git checkout -t alex/[branch-name]` - - I could now also push to `ajaust`'s remote + - `git remote add [remote-name] git@github.com:[remote-name]/precice.git` if I don't have remote already (or somebody else) + - `git fetch [remote-name]` + - `git checkout -t [remote-name]/[branch-name]` + - I could now also push to `[remote-name]`'s remote - (8) GitHub CLI - `git push -u ...` and `git pull -t ...` maybe hard to remember at first. diff --git a/01_version_control/git_exercise.md b/01_version_control/git_exercise.md index 31e08780..ee0a8ea9 100644 --- a/01_version_control/git_exercise.md +++ b/01_version_control/git_exercise.md @@ -1,6 +1,6 @@ # Exercise: Git Workflows -Deadline: **Wednesday, October 30, 2024, 9:00** +Deadline: **Wednesday, October 29, 2025, 9:00** ## Preparation diff --git a/01_version_control/merge_rebase_slides.md b/01_version_control/merge_rebase_slides.md index 8426038a..0fbc5602 100644 --- a/01_version_control/merge_rebase_slides.md +++ b/01_version_control/merge_rebase_slides.md @@ -153,7 +153,7 @@ We use here: - Create a merge commit - Squash and merge - Rebase and merge -- Look at a PR together, e.g. [PR 2113 from preCICE](https://github.com/precice/precice/pull/2113) (will be closed eventually) +- Look at a PR together, e.g. [PR 2346 from preCICE](https://github.com/precice/precice/pull/2346) (will be closed eventually) > What do the options do? diff --git a/01_version_control/my_favorite_neat_little_git_trick_demo.md b/01_version_control/my_favorite_neat_little_git_trick_demo.md index d5381f0e..3f5eecbb 100644 --- a/01_version_control/my_favorite_neat_little_git_trick_demo.md +++ b/01_version_control/my_favorite_neat_little_git_trick_demo.md @@ -4,6 +4,17 @@ - Preparation should not take longer than 15 mins, should be a demo. - Lecturers also prepare some. +## Tricks from Winter Team 2025/26 + +- Click on line number on GitHub and then `blame` to study history of file +- GitHub uses [gitignore templates](https://github.com/github/gitignore) if you create a `.gitignore` file from GitHub +- To get a nice compact `git log`, you can add the following to your `gitconfig`: + + ``` + [format] + pretty = format:%C(auto,yellow)%h %C(auto,blue)%>(12,trunc)%ad %C(auto,green)%<(20,trunc)%aN%C(auto,reset)%s%C(auto,red)% gD% D + ``` + ## Tricks from Winter Term 2024/25 - Click on line number on GitHub and then `blame` to study history of file