Switch dotfiles over to main branch naming convention and mentioon git switch for initialization

This commit is contained in:
David Holland 2023-07-23 01:42:20 +02:00
parent 82c8725f7c
commit 106098d1da
1 changed files with 19 additions and 2 deletions

View File

@ -1720,12 +1720,29 @@ To achieve this very specific setup, I have to turn my home directory into said
git fetch
git reset origin/master --hard
git reset origin/main --hard
git branch --set-upstream-to=origin/master master
git branch --set-upstream-to=origin/main main
```
]
#important[
This has lead to some problems in the past.
Generally I would try and use the new #cmd[`git switch`] command like so:
#terminal("~")[
```
git init
git remote add origin https://git.dustvoice.de/DustVoice/dotfiles.git
git fetch
git switch -C main origin/main
```
]
]
Now I can issue any `git` command in my `$HOME` directory because it now is a `git` repository.
=== Set up `gpg`