mirror of
https://github.com/mike-rambil/Advanced-Git.git
synced 2025-12-20 09:00:43 -06:00
chore: auto-generate README.md from toc-source.json
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[⬅️ Back to Sharing Changes as Patch Files](./sharing-changes-as-patch-files.md)
|
||||
[⬅️ Back to Sharing Changes as Patch Files](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/sharing-changes-as-patch-files.md)
|
||||
|
||||
[⬆️ Previous Step: Create Patch from Uncommitted Changes](./create-patch-from-uncommitted-changes.md)
|
||||
[⬆️ Previous Step: Create Patch from Uncommitted Changes](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/create-patch-from-uncommitted-changes.md)
|
||||
|
||||
# Apply Diff File
|
||||
|
||||
@@ -29,7 +29,7 @@ git apply --stat changes.diff
|
||||
1. Run '`git apply changes.diff' to apply the changes from a diff file`.
|
||||
|
||||
|
||||
[➡️ See the Next Step: Patch vs Diff: Quick Reference](./patch-vs-diff-quick-reference.md)
|
||||
[➡️ See the Next Step: Patch vs Diff: Quick Reference](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/patch-vs-diff-quick-reference.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[⬅️ Back to Sharing Changes as Patch Files](./sharing-changes-as-patch-files.md)
|
||||
[⬅️ Back to Sharing Changes as Patch Files](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/sharing-changes-as-patch-files.md)
|
||||
|
||||
[⬆️ Previous Step: Create Patch from Last Commit(s)](./create-patch-from-last-commit-s.md)
|
||||
[⬆️ Previous Step: Create Patch from Last Commit(s)](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/create-patch-from-last-commit-s.md)
|
||||
|
||||
# Apply Patch with Commit Metadata
|
||||
|
||||
@@ -29,7 +29,7 @@ git am --signoff my-changes.patch
|
||||
1. Run '`git am my-changes.patch' to apply the patch and preserve commit messages, authorship, and timestamps`.
|
||||
|
||||
|
||||
[➡️ See the Next Step: Create Patch from Uncommitted Changes](./create-patch-from-uncommitted-changes.md)
|
||||
[➡️ See the Next Step: Create Patch from Uncommitted Changes](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/create-patch-from-uncommitted-changes.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[⬅️ Back to How to Use git worktree Safely](./how-to-use-git-worktree-safely.md)
|
||||
[⬅️ Back to How to Use git worktree Safely](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/how-to-use-git-worktree-safely.md)
|
||||
|
||||
# Check Existing Worktrees
|
||||
|
||||
@@ -27,7 +27,7 @@ git worktree list --porcelain
|
||||
1. List all active worktrees.
|
||||
|
||||
|
||||
[➡️ See the Next Step: Create a New Worktree](./create-a-new-worktree.md)
|
||||
[➡️ See the Next Step: Create a New Worktree](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/create-a-new-worktree.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[⬅️ Back to Table of Contents](../README.md#cleanup-branches-fast)
|
||||
[⬅️ Back to Table of Contents](https://github.com/mike-rambil/Advanced-Git/blob/main/README.md#cleanup-branches-fast)
|
||||
|
||||
# Cleanup Branches Fast ⚡
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
- [View and Clean Up Local Git Branches (PowerShell)](./view-and-clean-up-local-git-branches-powershell.md): Scripts to view and clean up local branches using PowerShell.
|
||||
|
||||
|
||||
[➡️ Continue to Next Topic: Git Command Reference (Full List)](./git-command-reference-full-list.md)
|
||||
[➡️ Continue to Next Topic: Git Command Reference (Full List)](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/git-command-reference-full-list.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[⬅️ Back to How to Use git worktree Safely](./how-to-use-git-worktree-safely.md)
|
||||
[⬅️ Back to How to Use git worktree Safely](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/how-to-use-git-worktree-safely.md)
|
||||
|
||||
[⬆️ Previous Step: Check Existing Worktrees](./check-existing-worktrees.md)
|
||||
[⬆️ Previous Step: Check Existing Worktrees](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/check-existing-worktrees.md)
|
||||
|
||||
# Create a New Worktree
|
||||
|
||||
@@ -33,7 +33,7 @@ git worktree add ../hotfix hotfix-branch
|
||||
- The target path must not already be a git repository.
|
||||
|
||||
|
||||
[➡️ See the Next Step: Remove a Worktree](./remove-a-worktree.md)
|
||||
[➡️ See the Next Step: Remove a Worktree](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/remove-a-worktree.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[⬅️ Back to Sharing Changes as Patch Files](./sharing-changes-as-patch-files.md)
|
||||
[⬅️ Back to Sharing Changes as Patch Files](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/sharing-changes-as-patch-files.md)
|
||||
|
||||
# Create Patch from Last Commit(s)
|
||||
|
||||
@@ -47,7 +47,7 @@ git format-patch -2 origin/main..HEAD
|
||||
- [Official Docs](https://git-scm.com/docs/git-format-patch)
|
||||
|
||||
|
||||
[➡️ See the Next Step: Apply Patch with Commit Metadata](./apply-patch-with-commit-metadata.md)
|
||||
[➡️ See the Next Step: Apply Patch with Commit Metadata](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/apply-patch-with-commit-metadata.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[⬅️ Back to Sharing Changes as Patch Files](./sharing-changes-as-patch-files.md)
|
||||
[⬅️ Back to Sharing Changes as Patch Files](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/sharing-changes-as-patch-files.md)
|
||||
|
||||
[⬆️ Previous Step: Apply Patch with Commit Metadata](./apply-patch-with-commit-metadata.md)
|
||||
[⬆️ Previous Step: Apply Patch with Commit Metadata](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/apply-patch-with-commit-metadata.md)
|
||||
|
||||
# Create Patch from Uncommitted Changes
|
||||
|
||||
@@ -37,7 +37,7 @@ git diff HEAD~1 > last-commit.diff
|
||||
- [Official Docs](https://git-scm.com/docs/git-diff)
|
||||
|
||||
|
||||
[➡️ See the Next Step: Apply Diff File](./apply-diff-file.md)
|
||||
[➡️ See the Next Step: Apply Diff File](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/apply-diff-file.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[⬅️ Back to Cleanup Branches Fast ⚡](./cleanup-branches-fast.md)
|
||||
[⬅️ Back to Cleanup Branches Fast ⚡](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/cleanup-branches-fast.md)
|
||||
|
||||
# Delete Local Branches Whose Remote is Gone (Bash)
|
||||
|
||||
@@ -47,7 +47,7 @@ git fetch -p && git branch -vv | grep '\[origin/feature: gone\]' | awk '{print $
|
||||
|
||||
|
||||
|
||||
[➡️ See the Next Step: Delete Local Branches Whose Remote is Gone (PowerShell)](./delete-local-branches-whose-remote-is-gone-powershell.md)
|
||||
[➡️ See the Next Step: Delete Local Branches Whose Remote is Gone (PowerShell)](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/delete-local-branches-whose-remote-is-gone-powershell.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[⬅️ Back to Cleanup Branches Fast ⚡](./cleanup-branches-fast.md)
|
||||
[⬅️ Back to Cleanup Branches Fast ⚡](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/cleanup-branches-fast.md)
|
||||
|
||||
[⬆️ Previous Step: Delete Local Branches Whose Remote is Gone (Bash)](./delete-local-branches-whose-remote-is-gone-bash.md)
|
||||
[⬆️ Previous Step: Delete Local Branches Whose Remote is Gone (Bash)](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/delete-local-branches-whose-remote-is-gone-bash.md)
|
||||
|
||||
# Delete Local Branches Whose Remote is Gone (PowerShell)
|
||||
|
||||
@@ -52,7 +52,7 @@ git branch -vv | ForEach-Object { if ($_ -match '[origin/feature: gone]') { $par
|
||||
|
||||
|
||||
|
||||
[➡️ See the Next Step: View and Clean Up Local Git Branches (Bash)](./view-and-clean-up-local-git-branches-bash.md)
|
||||
[➡️ See the Next Step: View and Clean Up Local Git Branches (Bash)](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/view-and-clean-up-local-git-branches-bash.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[⬅️ Back to How to Use git worktree Safely](./how-to-use-git-worktree-safely.md)
|
||||
[⬅️ Back to How to Use git worktree Safely](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/how-to-use-git-worktree-safely.md)
|
||||
|
||||
[⬆️ Previous Step: Use Worktrees for Temporary Fixes](./use-worktrees-for-temporary-fixes.md)
|
||||
[⬆️ Previous Step: Use Worktrees for Temporary Fixes](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/use-worktrees-for-temporary-fixes.md)
|
||||
|
||||
# Flags and Their Uses
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
- `move`: Moves a worktree to a different location.
|
||||
|
||||
|
||||
[➡️ Continue to Next Topic: Sharing Changes as Patch Files](./sharing-changes-as-patch-files.md)
|
||||
[➡️ Continue to Next Topic: Sharing Changes as Patch Files](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/sharing-changes-as-patch-files.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[⬅️ Back to Table of Contents](../README.md#git-clean-remove-untracked-files-and-directories)
|
||||
[⬅️ Back to Table of Contents](https://github.com/mike-rambil/Advanced-Git/blob/main/README.md#git-clean-remove-untracked-files-and-directories)
|
||||
|
||||
# Git Clean: Remove Untracked Files and Directories
|
||||
|
||||
@@ -73,7 +73,7 @@ git clean -f -x
|
||||
- [Official Docs](https://git-scm.com/docs/git-clean)
|
||||
|
||||
|
||||
[➡️ Continue to Next Topic: How to Use git worktree Safely](./how-to-use-git-worktree-safely.md)
|
||||
[➡️ Continue to Next Topic: How to Use git worktree Safely](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/how-to-use-git-worktree-safely.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[⬅️ Back to Git Command Reference (Full List)](./git-command-reference-full-list.md)
|
||||
[⬅️ Back to Git Command Reference (Full List)](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/git-command-reference-full-list.md)
|
||||
|
||||
[⬆️ Previous Step: git init --bare](./git-init-bare.md)
|
||||
[⬆️ Previous Step: git init --bare](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/git-init-bare.md)
|
||||
|
||||
# git clone --mirror <repository>
|
||||
|
||||
@@ -31,7 +31,7 @@ git clone --mirror git@github.com:org/repo.git
|
||||
1. Run `git clone --mirror <repository>` to create a full backup or migration.
|
||||
|
||||
|
||||
[➡️ Continue to Next Topic: Useful Rare Git Commands You Never Heard Of](./useful-rare-git-commands-you-never-heard-of.md)
|
||||
[➡️ Continue to Next Topic: Useful Rare Git Commands You Never Heard Of](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/useful-rare-git-commands-you-never-heard-of.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[⬅️ Back to Table of Contents](../README.md#git-command-reference-full-list)
|
||||
[⬅️ Back to Table of Contents](https://github.com/mike-rambil/Advanced-Git/blob/main/README.md#git-command-reference-full-list)
|
||||
|
||||
# Git Command Reference (Full List)
|
||||
|
||||
@@ -13,7 +13,7 @@ A comprehensive list of Git commands used in this project, formatted according t
|
||||
- [git clone --mirror <repository>](./git-clone-mirror-repository.md): Clone a repository in mirror mode, including all refs and branches.
|
||||
|
||||
|
||||
[➡️ Continue to Next Topic: Useful Rare Git Commands You Never Heard Of](./useful-rare-git-commands-you-never-heard-of.md)
|
||||
[➡️ Continue to Next Topic: Useful Rare Git Commands You Never Heard Of](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/useful-rare-git-commands-you-never-heard-of.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[⬅️ Back to Table of Contents](../README.md#git-essentials-hidden-gems)
|
||||
[⬅️ Back to Table of Contents](https://github.com/mike-rambil/Advanced-Git/blob/main/README.md#git-essentials-hidden-gems)
|
||||
|
||||
# Git Essentials & Hidden Gems
|
||||
|
||||
@@ -22,7 +22,7 @@ A collection of practical, lesser-known, and foundational Git commands that are
|
||||
- [git request-pull](./git-request-pull.md): Generate a request to pull changes into a repository.
|
||||
|
||||
|
||||
[➡️ Continue to Next Topic: Cleanup Branches Fast ⚡](./cleanup-branches-fast.md)
|
||||
[➡️ Continue to Next Topic: Cleanup Branches Fast ⚡](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/cleanup-branches-fast.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[⬅️ Back to Git Command Reference (Full List)](./git-command-reference-full-list.md)
|
||||
[⬅️ Back to Git Command Reference (Full List)](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/git-command-reference-full-list.md)
|
||||
|
||||
# git init --bare
|
||||
|
||||
@@ -29,7 +29,7 @@ git init --bare /srv/git/project.git
|
||||
1. Run `git init --bare my-repo.git` to create a bare repository.
|
||||
|
||||
|
||||
[➡️ See the Next Step: git clone --mirror <repository>](./git-clone-mirror-repository.md)
|
||||
[➡️ See the Next Step: git clone --mirror <repository>](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/git-clone-mirror-repository.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[⬅️ Back to Git Essentials & Hidden Gems](./git-essentials-hidden-gems.md)
|
||||
[⬅️ Back to Git Essentials & Hidden Gems](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/git-essentials-hidden-gems.md)
|
||||
|
||||
# git maintenance start
|
||||
|
||||
@@ -50,7 +50,7 @@ git maintenance start --schedule=hourly
|
||||
- [Official Docs](https://git-scm.com/docs/git-maintenance)
|
||||
|
||||
|
||||
[➡️ See the Next Step: git request-pull](./git-request-pull.md)
|
||||
[➡️ See the Next Step: git request-pull](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/git-request-pull.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[⬅️ Back to Useful Rare Git Commands You Never Heard Of](./useful-rare-git-commands-you-never-heard-of.md)
|
||||
[⬅️ Back to Useful Rare Git Commands You Never Heard Of](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/useful-rare-git-commands-you-never-heard-of.md)
|
||||
|
||||
# git replace <old-commit> <new-commit>
|
||||
|
||||
@@ -29,7 +29,7 @@ git replace --graft HEAD~2 HEAD
|
||||
1. Run `git replace <old-commit> <new-commit>` to test or patch history.
|
||||
|
||||
|
||||
[➡️ Continue to Next Topic: How to Use git push --force-with-lease Safely](./how-to-use-git-push-force-with-lease-safely.md)
|
||||
[➡️ Continue to Next Topic: How to Use git push --force-with-lease Safely](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/how-to-use-git-push-force-with-lease-safely.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[⬅️ Back to Git Essentials & Hidden Gems](./git-essentials-hidden-gems.md)
|
||||
[⬅️ Back to Git Essentials & Hidden Gems](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/git-essentials-hidden-gems.md)
|
||||
|
||||
[⬆️ Previous Step: git maintenance start](./git-maintenance-start.md)
|
||||
[⬆️ Previous Step: git maintenance start](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/git-maintenance-start.md)
|
||||
|
||||
# git request-pull
|
||||
|
||||
@@ -75,7 +75,7 @@ git request-pull main https://github.com/example/repo.git feature-branch
|
||||
- [Official Docs](https://git-scm.com/docs/git-request-pull)
|
||||
|
||||
|
||||
[➡️ Continue to Next Topic: Cleanup Branches Fast ⚡](./cleanup-branches-fast.md)
|
||||
[➡️ Continue to Next Topic: Cleanup Branches Fast ⚡](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/cleanup-branches-fast.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[⬅️ Back to Table of Contents](../README.md#how-to-use-git-push-force-with-lease-safely)
|
||||
[⬅️ Back to Table of Contents](https://github.com/mike-rambil/Advanced-Git/blob/main/README.md#how-to-use-git-push-force-with-lease-safely)
|
||||
|
||||
# How to Use git push --force-with-lease Safely
|
||||
|
||||
@@ -46,7 +46,7 @@ git push --force-with-lease origin feature-branch
|
||||
- [Medium Article](https://medium.com/@sahilsahilbhatia/git-push-force-with-lease-vs-force-ecae72601e80)
|
||||
|
||||
|
||||
[➡️ Continue to Next Topic: Past commits of a specific file](./past-commits-of-a-specific-file.md)
|
||||
[➡️ Continue to Next Topic: Past commits of a specific file](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/past-commits-of-a-specific-file.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[⬅️ Back to Table of Contents](../README.md#how-to-use-git-worktree-safely)
|
||||
[⬅️ Back to Table of Contents](https://github.com/mike-rambil/Advanced-Git/blob/main/README.md#how-to-use-git-worktree-safely)
|
||||
|
||||
# How to Use git worktree Safely
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
- [Flags and Their Uses](./flags-and-their-uses.md)
|
||||
|
||||
|
||||
[➡️ Continue to Next Topic: Sharing Changes as Patch Files](./sharing-changes-as-patch-files.md)
|
||||
[➡️ Continue to Next Topic: Sharing Changes as Patch Files](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/sharing-changes-as-patch-files.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[⬅️ Back to Table of Contents](../README.md#past-commits-of-a-specific-file)
|
||||
[⬅️ Back to Table of Contents](https://github.com/mike-rambil/Advanced-Git/blob/main/README.md#past-commits-of-a-specific-file)
|
||||
|
||||
# Past commits of a specific file
|
||||
|
||||
@@ -15,7 +15,7 @@ You can see all commits related to a specific file using Git commands. Here are
|
||||
- [See Who Last Modified Each Line (Blame)](./see-who-last-modified-each-line-blame.md)
|
||||
|
||||
|
||||
[➡️ Continue to Next Topic: Git Clean: Remove Untracked Files and Directories](./git-clean-remove-untracked-files-and-directories.md)
|
||||
[➡️ Continue to Next Topic: Git Clean: Remove Untracked Files and Directories](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/git-clean-remove-untracked-files-and-directories.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[⬅️ Back to Sharing Changes as Patch Files](./sharing-changes-as-patch-files.md)
|
||||
[⬅️ Back to Sharing Changes as Patch Files](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/sharing-changes-as-patch-files.md)
|
||||
|
||||
[⬆️ Previous Step: Apply Diff File](./apply-diff-file.md)
|
||||
[⬆️ Previous Step: Apply Diff File](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/apply-diff-file.md)
|
||||
|
||||
# Patch vs Diff: Quick Reference
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
| git format-patch > file.patch | Share committed changes | ✅ | git am |
|
||||
|
||||
|
||||
[➡️ Continue to Next Topic: Pull Changes of Specific Files from a Commit](./pull-changes-of-specific-files-from-a-commit.md)
|
||||
[➡️ Continue to Next Topic: Pull Changes of Specific Files from a Commit](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/pull-changes-of-specific-files-from-a-commit.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[⬅️ Back to Table of Contents](../README.md#pull-changes-of-specific-files-from-a-commit)
|
||||
[⬅️ Back to Table of Contents](https://github.com/mike-rambil/Advanced-Git/blob/main/README.md#pull-changes-of-specific-files-from-a-commit)
|
||||
|
||||
# Pull Changes of Specific Files from a Commit
|
||||
|
||||
@@ -57,11 +57,11 @@ git restore --source e8ab7f64fdfcc7bdaaed8d96c0ac26dce035663f path/to/file1.txt
|
||||
You've reached the end of this comprehensive Git guide! You've learned some of the most advanced Git techniques and commands.
|
||||
|
||||
**What's next?**
|
||||
- [📚 Explore more Git topics in the main guide](../README.md)
|
||||
- [📚 Explore more Git topics in the main guide](https://github.com/mike-rambil/Advanced-Git/blob/main/README.md)
|
||||
- 🚀 **Great Git contributors put everything into practice** - if you discovered something useful or have your own Git tips, consider contributing to this repository!
|
||||
- 💡 Found a bug or have suggestions? [Open an issue or submit a PR](../README.md#contributors--credits)
|
||||
- 💡 Found a bug or have suggestions? [Open an issue or submit a PR](https://github.com/mike-rambil/Advanced-Git/blob/main/README.md#contributors--credits)
|
||||
|
||||
[🏠 Back to Main README](../README.md)
|
||||
[🏠 Back to Main README](https://github.com/mike-rambil/Advanced-Git/blob/main/README.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[⬅️ Back to How to Use git worktree Safely](./how-to-use-git-worktree-safely.md)
|
||||
[⬅️ Back to How to Use git worktree Safely](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/how-to-use-git-worktree-safely.md)
|
||||
|
||||
[⬆️ Previous Step: Create a New Worktree](./create-a-new-worktree.md)
|
||||
[⬆️ Previous Step: Create a New Worktree](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/create-a-new-worktree.md)
|
||||
|
||||
# Remove a Worktree
|
||||
|
||||
@@ -33,7 +33,7 @@ git worktree remove ../hotfix
|
||||
- ⚠️ Make sure you have committed all changes before removing a worktree.
|
||||
|
||||
|
||||
[➡️ See the Next Step: Switch Between Worktrees](./switch-between-worktrees.md)
|
||||
[➡️ See the Next Step: Switch Between Worktrees](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/switch-between-worktrees.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[⬅️ Back to Past commits of a specific file](./past-commits-of-a-specific-file.md)
|
||||
[⬅️ Back to Past commits of a specific file](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/past-commits-of-a-specific-file.md)
|
||||
|
||||
[⬆️ Previous Step: Show Commit History With Author and Date](./show-commit-history-with-author-and-date.md)
|
||||
[⬆️ Previous Step: Show Commit History With Author and Date](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/show-commit-history-with-author-and-date.md)
|
||||
|
||||
# See Who Last Modified Each Line (Blame)
|
||||
|
||||
@@ -33,7 +33,7 @@ git blame -L 10,20 filename.txt
|
||||
- ⚠️ Blame can be misleading if the file has been heavily refactored.
|
||||
|
||||
|
||||
[➡️ Continue to Next Topic: Git Clean: Remove Untracked Files and Directories](./git-clean-remove-untracked-files-and-directories.md)
|
||||
[➡️ Continue to Next Topic: Git Clean: Remove Untracked Files and Directories](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/git-clean-remove-untracked-files-and-directories.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[⬅️ Back to Table of Contents](../README.md#sharing-changes-as-patch-files)
|
||||
[⬅️ Back to Table of Contents](https://github.com/mike-rambil/Advanced-Git/blob/main/README.md#sharing-changes-as-patch-files)
|
||||
|
||||
# Sharing Changes as Patch Files
|
||||
|
||||
@@ -16,7 +16,7 @@ How to create patch files from your changes for sharing via email, SCP, Slack, o
|
||||
- [Patch vs Diff: Quick Reference](./patch-vs-diff-quick-reference.md)
|
||||
|
||||
|
||||
[➡️ Continue to Next Topic: Pull Changes of Specific Files from a Commit](./pull-changes-of-specific-files-from-a-commit.md)
|
||||
[➡️ Continue to Next Topic: Pull Changes of Specific Files from a Commit](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/pull-changes-of-specific-files-from-a-commit.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[⬅️ Back to Past commits of a specific file](./past-commits-of-a-specific-file.md)
|
||||
[⬅️ Back to Past commits of a specific file](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/past-commits-of-a-specific-file.md)
|
||||
|
||||
# Show Commit History of a Specific File
|
||||
|
||||
@@ -32,7 +32,7 @@ git log --oneline -- path/to/anotherfile.js
|
||||
- git blame filename.txt
|
||||
|
||||
|
||||
[➡️ See the Next Step: Show Detailed Commit History (With Changes)](./show-detailed-commit-history-with-changes.md)
|
||||
[➡️ See the Next Step: Show Detailed Commit History (With Changes)](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/show-detailed-commit-history-with-changes.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[⬅️ Back to Past commits of a specific file](./past-commits-of-a-specific-file.md)
|
||||
[⬅️ Back to Past commits of a specific file](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/past-commits-of-a-specific-file.md)
|
||||
|
||||
[⬆️ Previous Step: Show Detailed Commit History (With Changes)](./show-detailed-commit-history-with-changes.md)
|
||||
[⬆️ Previous Step: Show Detailed Commit History (With Changes)](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/show-detailed-commit-history-with-changes.md)
|
||||
|
||||
# Show Commit History With Author and Date
|
||||
|
||||
@@ -29,7 +29,7 @@ git log --pretty=format:'%h | %ad | %an | %s' --date=short -- filename.txt
|
||||
1. Displays commit hash, author, relative date, and commit message.
|
||||
|
||||
|
||||
[➡️ See the Next Step: See Who Last Modified Each Line (Blame)](./see-who-last-modified-each-line-blame.md)
|
||||
[➡️ See the Next Step: See Who Last Modified Each Line (Blame)](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/see-who-last-modified-each-line-blame.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[⬅️ Back to Past commits of a specific file](./past-commits-of-a-specific-file.md)
|
||||
[⬅️ Back to Past commits of a specific file](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/past-commits-of-a-specific-file.md)
|
||||
|
||||
[⬆️ Previous Step: Show Commit History of a Specific File](./show-commit-history-of-a-specific-file.md)
|
||||
[⬆️ Previous Step: Show Commit History of a Specific File](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/show-commit-history-of-a-specific-file.md)
|
||||
|
||||
# Show Detailed Commit History (With Changes)
|
||||
|
||||
@@ -33,7 +33,7 @@ git log -p -2 -- filename.txt
|
||||
- git log --oneline -- filename.txt
|
||||
|
||||
|
||||
[➡️ See the Next Step: Show Commit History With Author and Date](./show-commit-history-with-author-and-date.md)
|
||||
[➡️ See the Next Step: Show Commit History With Author and Date](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/show-commit-history-with-author-and-date.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[⬅️ Back to How to Use git worktree Safely](./how-to-use-git-worktree-safely.md)
|
||||
[⬅️ Back to How to Use git worktree Safely](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/how-to-use-git-worktree-safely.md)
|
||||
|
||||
[⬆️ Previous Step: Remove a Worktree](./remove-a-worktree.md)
|
||||
[⬆️ Previous Step: Remove a Worktree](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/remove-a-worktree.md)
|
||||
|
||||
# Switch Between Worktrees
|
||||
|
||||
@@ -27,7 +27,7 @@ cd ../hotfix
|
||||
1. Simply cd into the worktree directory to switch.
|
||||
|
||||
|
||||
[➡️ See the Next Step: Use Worktrees for Temporary Fixes](./use-worktrees-for-temporary-fixes.md)
|
||||
[➡️ See the Next Step: Use Worktrees for Temporary Fixes](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/use-worktrees-for-temporary-fixes.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[⬅️ Back to How to Use git worktree Safely](./how-to-use-git-worktree-safely.md)
|
||||
[⬅️ Back to How to Use git worktree Safely](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/how-to-use-git-worktree-safely.md)
|
||||
|
||||
[⬆️ Previous Step: Switch Between Worktrees](./switch-between-worktrees.md)
|
||||
[⬆️ Previous Step: Switch Between Worktrees](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/switch-between-worktrees.md)
|
||||
|
||||
# Use Worktrees for Temporary Fixes
|
||||
|
||||
@@ -29,7 +29,7 @@ git worktree add ../bugfix bugfix-branch
|
||||
1. Quickly apply a fix on another branch without leaving your main branch.
|
||||
|
||||
|
||||
[➡️ See the Next Step: Flags and Their Uses](./flags-and-their-uses.md)
|
||||
[➡️ See the Next Step: Flags and Their Uses](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/flags-and-their-uses.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[⬅️ Back to Table of Contents](../README.md#useful-rare-git-commands-you-never-heard-of)
|
||||
[⬅️ Back to Table of Contents](https://github.com/mike-rambil/Advanced-Git/blob/main/README.md#useful-rare-git-commands-you-never-heard-of)
|
||||
|
||||
# Useful Rare Git Commands You Never Heard Of
|
||||
|
||||
@@ -12,7 +12,7 @@ A collection of lesser-known but powerful Git commands. Use these to level up yo
|
||||
- [git replace <old-commit> <new-commit>](./git-replace-old-commit-new-commit.md): Temporarily substitute one commit for another.
|
||||
|
||||
|
||||
[➡️ Continue to Next Topic: How to Use git push --force-with-lease Safely](./how-to-use-git-push-force-with-lease-safely.md)
|
||||
[➡️ Continue to Next Topic: How to Use git push --force-with-lease Safely](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/how-to-use-git-push-force-with-lease-safely.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[⬅️ Back to Cleanup Branches Fast ⚡](./cleanup-branches-fast.md)
|
||||
[⬅️ Back to Cleanup Branches Fast ⚡](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/cleanup-branches-fast.md)
|
||||
|
||||
[⬆️ Previous Step: Delete Local Branches Whose Remote is Gone (PowerShell)](./delete-local-branches-whose-remote-is-gone-powershell.md)
|
||||
[⬆️ Previous Step: Delete Local Branches Whose Remote is Gone (PowerShell)](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/delete-local-branches-whose-remote-is-gone-powershell.md)
|
||||
|
||||
# View and Clean Up Local Git Branches (Bash)
|
||||
|
||||
@@ -47,7 +47,7 @@ git branch -vv | grep 'gone'
|
||||
|
||||
|
||||
|
||||
[➡️ See the Next Step: View and Clean Up Local Git Branches (PowerShell)](./view-and-clean-up-local-git-branches-powershell.md)
|
||||
[➡️ See the Next Step: View and Clean Up Local Git Branches (PowerShell)](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/view-and-clean-up-local-git-branches-powershell.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[⬅️ Back to Cleanup Branches Fast ⚡](./cleanup-branches-fast.md)
|
||||
[⬅️ Back to Cleanup Branches Fast ⚡](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/cleanup-branches-fast.md)
|
||||
|
||||
[⬆️ Previous Step: View and Clean Up Local Git Branches (Bash)](./view-and-clean-up-local-git-branches-bash.md)
|
||||
[⬆️ Previous Step: View and Clean Up Local Git Branches (Bash)](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/view-and-clean-up-local-git-branches-bash.md)
|
||||
|
||||
# View and Clean Up Local Git Branches (PowerShell)
|
||||
|
||||
@@ -47,7 +47,7 @@ git branch -vv | Select-String 'gone'
|
||||
|
||||
|
||||
|
||||
[➡️ Continue to Next Topic: Git Command Reference (Full List)](./git-command-reference-full-list.md)
|
||||
[➡️ Continue to Next Topic: Git Command Reference (Full List)](https://github.com/mike-rambil/Advanced-Git/blob/main/contents/git-command-reference-full-list.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user