Something I recently learnt of is git aliases
https://git-scm.com/book/en/v2/Git-Basics-Git-Aliases
Here are some aliases I implemented
- `git co <branch-name>` to `git checkout <branch-name>` (activate with `git config --global alias.co checkout`)- `git com` to `git checkout master` (activate with `git config --global alias.com "checkout master"`)- `git R` to `git restore .` (activate with `git config --global alias.R "restore ."`)- `git A` to `git add .` (activate with `git config --global alias.A "add ."`)
Can also have specific branch aliases only, where you just have to replace `--global` with `--local` within the specific branch.
QOTO: Question Others to Teach Ourselves An inclusive, Academic Freedom, instance All cultures welcome. Hate speech and harassment strictly forbidden.
Here are some aliases I implemented
- `git co <branch-name>` to `git checkout <branch-name>` (activate with `git config --global alias.co checkout`)
- `git com` to `git checkout master` (activate with `git config --global alias.com "checkout master"`)
- `git R` to `git restore .` (activate with `git config --global alias.R "restore ."`)
- `git A` to `git add .` (activate with `git config --global alias.A "add ."`)
Can also have specific branch aliases only, where you just have to replace `--global` with `--local` within the specific branch.