diff --git a/03. Resources/Development/Git.md b/03. Resources/Development/Git/Git.md similarity index 95% rename from 03. Resources/Development/Git.md rename to 03. Resources/Development/Git/Git.md index eaad70f..af9c8ba 100644 --- a/03. Resources/Development/Git.md +++ b/03. Resources/Development/Git/Git.md @@ -4,7 +4,6 @@ updated: 2024-03-12 13:49 tags: - dev-tools --- -## Merge strategies ![Git Merge vs Rebase vs Squash ¿Qué estrategia debemos elegir](2023-11-04%20-%20Git%20Merge%20vs%20Rebase%20vs%20Squash%20¿Qué%20estrategia%20debemos%20elegir-.md#notes) diff --git a/03. Resources/Development/Git/Pasted image 20240417084933.png b/03. Resources/Development/Git/Pasted image 20240417084933.png new file mode 100644 index 0000000..472ea53 Binary files /dev/null and b/03. Resources/Development/Git/Pasted image 20240417084933.png differ diff --git a/03. Resources/Development/Git/Pasted image 20240417084959.png b/03. Resources/Development/Git/Pasted image 20240417084959.png new file mode 100644 index 0000000..38ae4e2 Binary files /dev/null and b/03. Resources/Development/Git/Pasted image 20240417084959.png differ diff --git a/03. Resources/Development/Git/Pasted image 20240417085036.png b/03. Resources/Development/Git/Pasted image 20240417085036.png new file mode 100644 index 0000000..aa34bc0 Binary files /dev/null and b/03. Resources/Development/Git/Pasted image 20240417085036.png differ diff --git a/03. Resources/Development/Git/So You Think You Know Git Part 2 - DevWorld 2024.md b/03. Resources/Development/Git/So You Think You Know Git Part 2 - DevWorld 2024.md new file mode 100644 index 0000000..c1c7e93 --- /dev/null +++ b/03. Resources/Development/Git/So You Think You Know Git Part 2 - DevWorld 2024.md @@ -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` + +![](Pasted%20image%2020240417084933.png) + +## Git Hooks + +![](Pasted%20image%2020240417084959.png) + +useful ones: + +![](Pasted%20image%2020240417085036.png) + +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=` +`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 + +![](https://www.youtube.com/watch?v=Md44rcw13k4)