Update from obsidian - thinkpad
Affected files: 03. Resources/Development/Git/Git.md 03. Resources/Development/Git/Pasted image 20240417084933.png 03. Resources/Development/Git/Pasted image 20240417084959.png 03. Resources/Development/Git/Pasted image 20240417085036.png 03. Resources/Development/Git/So You Think You Know Git Part 2 - DevWorld 2024.md
This commit is contained in:
parent
8770123e14
commit
eb51c17575
5 changed files with 65 additions and 1 deletions
14
03. Resources/Development/Git/Git.md
Normal file
14
03. Resources/Development/Git/Git.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
created: 2024-02-13 22:36
|
||||
updated: 2024-03-12 13:49
|
||||
tags:
|
||||
- dev-tools
|
||||
---
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
BIN
03. Resources/Development/Git/Pasted image 20240417084933.png
Normal file
BIN
03. Resources/Development/Git/Pasted image 20240417084933.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 194 KiB |
BIN
03. Resources/Development/Git/Pasted image 20240417084959.png
Normal file
BIN
03. Resources/Development/Git/Pasted image 20240417084959.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 361 KiB |
BIN
03. Resources/Development/Git/Pasted image 20240417085036.png
Normal file
BIN
03. Resources/Development/Git/Pasted image 20240417085036.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 238 KiB |
|
|
@ -0,0 +1,65 @@
|
|||
# So You Think You Know Git Part 2 - DevWorld 2024
|
||||
|
||||
## Switch and Restore
|
||||
|
||||
Wrapper around the `checkout` command to make more sense. You can do:
|
||||
|
||||
- `git switch branch` instead of `git checkout bracnh`
|
||||
- `git restore file.txt` instead of `git checkout file.txt`
|
||||
|
||||

|
||||
|
||||
## Git Hooks
|
||||
|
||||

|
||||
|
||||
useful ones:
|
||||
|
||||

|
||||
|
||||
uses:
|
||||
|
||||
- Commit message formatting
|
||||
- package install
|
||||
- update ctags
|
||||
- submodule status
|
||||
- tabs or spaces
|
||||
- linting
|
||||
- large files
|
||||
- test passes
|
||||
|
||||
Helpers (installable external tools):
|
||||
|
||||
- pre-commits
|
||||
- husky
|
||||
|
||||
## Attributes
|
||||
|
||||
run files through intermediates and diff that:
|
||||
|
||||
```bash
|
||||
echo '*.png diff=lexif' >> .gitattributes
|
||||
git config diff.exif.textconv exiftool
|
||||
```
|
||||
|
||||
## Fixup Commits
|
||||
|
||||
`git commit --fixup=<commit>`
|
||||
`git rebase --autosquash`
|
||||
|
||||
## Rebasing Stacks
|
||||
|
||||
move dangling branches reference when doing a rebase
|
||||
|
||||
`git rebase --update-refs`
|
||||
|
||||
## Scaling Git
|
||||
|
||||
top level command `scalar`, it's only used to clone huge repositories.
|
||||
|
||||
## Worktrees
|
||||
|
||||
- working on more than one branch at a time
|
||||
- provide a new working directory to each branch
|
||||
|
||||

|
||||
Loading…
Add table
Add a link
Reference in a new issue