mirror of
https://github.com/mike-rambil/Advanced-Git.git
synced 2026-01-05 17:09:30 -06:00
chore: auto-generate README.md from toc-source.json
This commit is contained in:
@@ -25,13 +25,8 @@ git apply changes.diff
|
||||
1. Run '`git apply changes.diff' to apply the changes from a diff file`.
|
||||
|
||||
|
||||
#### Tags
|
||||
`diff`, `apply`, `uncommitted`
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
|
||||
[➡️ See the Next Step: Patch vs Diff: Quick Reference](./patch-vs-diff-quick-reference.md)
|
||||
|
||||
---
|
||||
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: diff, apply, uncommitted_
|
||||
|
||||
@@ -25,13 +25,8 @@ git am my-changes.patch
|
||||
1. Run '`git am my-changes.patch' to apply the patch and preserve commit messages, authorship, and timestamps`.
|
||||
|
||||
|
||||
#### Tags
|
||||
`patch`, `am`, `apply`
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
|
||||
[➡️ See the Next Step: Create Patch from Uncommitted Changes](./create-patch-from-uncommitted-changes.md)
|
||||
|
||||
---
|
||||
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: patch, am, apply_
|
||||
|
||||
@@ -23,13 +23,8 @@ git worktree list
|
||||
1. List all active worktrees.
|
||||
|
||||
|
||||
#### Tags
|
||||
`worktree`, `list`
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
|
||||
[➡️ See the Next Step: Create a New Worktree](./create-a-new-worktree.md)
|
||||
|
||||
---
|
||||
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: worktree, list_
|
||||
|
||||
@@ -29,13 +29,8 @@ git worktree add ../feature-branch feature
|
||||
- The target path must not already be a git repository.
|
||||
|
||||
|
||||
#### Tags
|
||||
`worktree`, `add`
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
|
||||
[➡️ See the Next Step: Remove a Worktree](./remove-a-worktree.md)
|
||||
|
||||
---
|
||||
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: worktree, add_
|
||||
|
||||
@@ -39,13 +39,8 @@ git format-patch origin/main..HEAD --stdout > my-changes.patch
|
||||
- [Official Docs](https://git-scm.com/docs/git-format-patch)
|
||||
|
||||
|
||||
#### Tags
|
||||
`patch`, `format-patch`, `committed`
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
|
||||
[➡️ See the Next Step: Apply Patch with Commit Metadata](./apply-patch-with-commit-metadata.md)
|
||||
|
||||
---
|
||||
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: patch, format-patch, committed_
|
||||
|
||||
@@ -33,13 +33,8 @@ git diff > changes.diff
|
||||
- [Official Docs](https://git-scm.com/docs/git-diff)
|
||||
|
||||
|
||||
#### Tags
|
||||
`diff`, `uncommitted`, `snapshot`
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
|
||||
[➡️ See the Next Step: Apply Diff File](./apply-diff-file.md)
|
||||
|
||||
---
|
||||
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: diff, uncommitted, snapshot_
|
||||
|
||||
@@ -14,11 +14,6 @@
|
||||
- `move`: Moves a worktree to a different location.
|
||||
|
||||
|
||||
#### Tags
|
||||
`worktree`, `flags`
|
||||
---
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: worktree, flags_
|
||||
|
||||
@@ -72,11 +72,6 @@ git clean -i
|
||||
- [Official Docs](https://git-scm.com/docs/git-clean)
|
||||
|
||||
|
||||
#### Tags
|
||||
`clean`, `untracked`, `workspace`
|
||||
---
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: clean, untracked, workspace_
|
||||
|
||||
@@ -27,11 +27,6 @@ git clone --mirror https://github.com/example/repo.git
|
||||
1. Run `git clone --mirror <repository>` to create a full backup or migration.
|
||||
|
||||
|
||||
#### Tags
|
||||
`clone`, `mirror`, `backup`
|
||||
---
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: clone, mirror, backup_
|
||||
|
||||
@@ -9,15 +9,6 @@
|
||||
A comprehensive list of Git commands used in this project, formatted according to our standard.
|
||||
|
||||
|
||||
#### Tags
|
||||
`reference`, `all-commands`
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
|
||||
---
|
||||
|
||||
### Subcommands
|
||||
@@ -81,3 +72,7 @@ mike-rambil
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
|
||||
|
||||
---
|
||||
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: reference, all-commands_
|
||||
|
||||
@@ -25,13 +25,8 @@ git init --bare my-repo.git
|
||||
1. Run `git init --bare my-repo.git` to create a bare repository.
|
||||
|
||||
|
||||
#### Tags
|
||||
`init`, `bare`, `repository`
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
|
||||
[➡️ See the Next Step: git clone --mirror <repository>](./git-clone-mirror-repository.md)
|
||||
|
||||
---
|
||||
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: init, bare, repository_
|
||||
|
||||
@@ -29,13 +29,8 @@ git maintenance start
|
||||
- [Official Docs](https://git-scm.com/docs/git-maintenance)
|
||||
|
||||
|
||||
#### Tags
|
||||
`maintenance`, `automation`
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
|
||||
[➡️ See the Next Step: git request-pull](./git-request-pull.md)
|
||||
|
||||
---
|
||||
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: maintenance, automation_
|
||||
|
||||
@@ -25,11 +25,6 @@ git replace abc123 def456
|
||||
1. Run `git replace <old-commit> <new-commit>` to test or patch history.
|
||||
|
||||
|
||||
#### Tags
|
||||
`replace`, `history`
|
||||
---
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: replace, history_
|
||||
|
||||
@@ -31,13 +31,8 @@ git request-pull v1.0 https://github.com/example/repo.git v1.1
|
||||
- [Official Docs](https://git-scm.com/docs/git-request-pull)
|
||||
|
||||
|
||||
#### Tags
|
||||
`collaboration`, `pull-request`
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
|
||||
[➡️ See the Next Step: View and Clean Up Local Git Branches (Bash)](./view-and-clean-up-local-git-branches-bash.md)
|
||||
|
||||
---
|
||||
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: collaboration, pull-request_
|
||||
|
||||
@@ -42,11 +42,6 @@ git push --force-with-lease
|
||||
- [Medium Article](https://medium.com/@sahilsahilbhatia/git-push-force-with-lease-vs-force-ecae72601e80)
|
||||
|
||||
|
||||
#### Tags
|
||||
`push`, `force`, `safe`
|
||||
---
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: push, force, safe_
|
||||
|
||||
@@ -9,15 +9,6 @@
|
||||
`git worktree` allows you to manage multiple working directories linked to a single Git repository. It helps developers work on multiple branches simultaneously without switching branches in the same directory.
|
||||
|
||||
|
||||
#### Tags
|
||||
`worktree`, `branches`, `advanced`
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
|
||||
---
|
||||
|
||||
### Subcommands
|
||||
@@ -192,3 +183,7 @@ mike-rambil
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
|
||||
|
||||
---
|
||||
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: worktree, branches, advanced_
|
||||
|
||||
@@ -9,15 +9,6 @@
|
||||
This file collects useful Git commands and scripts that were previously only in the README and not referenced elsewhere in this repository.
|
||||
|
||||
|
||||
#### Tags
|
||||
`misc`, `cleanup`, `advanced`
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
|
||||
---
|
||||
|
||||
### Subcommands
|
||||
@@ -165,3 +156,7 @@ mike-rambil
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
|
||||
|
||||
---
|
||||
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: misc, cleanup, advanced_
|
||||
|
||||
@@ -9,15 +9,6 @@
|
||||
You can see all commits related to a specific file using Git commands. Here are a few ways to do it:
|
||||
|
||||
|
||||
#### Tags
|
||||
`history`, `inspection`, `file`
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
|
||||
---
|
||||
|
||||
### Subcommands
|
||||
@@ -150,3 +141,7 @@ mike-rambil
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
|
||||
|
||||
---
|
||||
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: history, inspection, file_
|
||||
|
||||
@@ -7,11 +7,6 @@
|
||||
|
||||

|
||||
|
||||
#### Tags
|
||||
`patch`, `diff`, `reference`
|
||||
---
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: patch, diff, reference_
|
||||
|
||||
@@ -47,11 +47,6 @@ git push origin revert/productionOrder
|
||||
- [Git Docs: git checkout](https://git-scm.com/docs/git-checkout)
|
||||
|
||||
|
||||
#### Tags
|
||||
`checkout`, `restore`, `file`, `commit`, `cherry-pick`
|
||||
---
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: checkout, restore, file, commit, cherry-pick_
|
||||
|
||||
@@ -29,13 +29,8 @@ git worktree remove ../feature-branch
|
||||
- ⚠️ Make sure you have committed all changes before removing a worktree.
|
||||
|
||||
|
||||
#### Tags
|
||||
`worktree`, `remove`
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
|
||||
[➡️ See the Next Step: Switch Between Worktrees](./switch-between-worktrees.md)
|
||||
|
||||
---
|
||||
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: worktree, remove_
|
||||
|
||||
@@ -29,11 +29,6 @@ git blame filename.txt
|
||||
- ⚠️ Blame can be misleading if the file has been heavily refactored.
|
||||
|
||||
|
||||
#### Tags
|
||||
`blame`, `file`, `history`
|
||||
---
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: blame, file, history_
|
||||
|
||||
@@ -9,15 +9,6 @@
|
||||
How to create patch files from your changes for sharing via email, SCP, Slack, or other means. Covers both committed (with full commit metadata) and uncommitted changes.
|
||||
|
||||
|
||||
#### Tags
|
||||
`patch`, `diff`, `sharing`, `email`, `collaboration`
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
|
||||
---
|
||||
|
||||
### Subcommands
|
||||
@@ -172,3 +163,7 @@ mike-rambil
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
|
||||
|
||||
---
|
||||
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: patch, diff, sharing, email, collaboration_
|
||||
|
||||
@@ -23,18 +23,13 @@ git log --oneline -- filename.txt
|
||||
1. Lists all commits that modified `filename.txt`.
|
||||
|
||||
|
||||
#### Tags
|
||||
`log`, `file`, `history`
|
||||
|
||||
#### Related Commands
|
||||
- git log -p -- filename.txt
|
||||
- git blame filename.txt
|
||||
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
|
||||
[➡️ See the Next Step: Show Detailed Commit History (With Changes)](./show-detailed-commit-history-with-changes.md)
|
||||
|
||||
---
|
||||
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: log, file, history_
|
||||
|
||||
@@ -25,13 +25,8 @@ git log --pretty=format:"%h - %an, %ar : %s" -- filename.txt
|
||||
1. Displays commit hash, author, relative date, and commit message.
|
||||
|
||||
|
||||
#### Tags
|
||||
`log`, `author`, `date`
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
|
||||
[➡️ See the Next Step: See Who Last Modified Each Line (Blame)](./see-who-last-modified-each-line-blame.md)
|
||||
|
||||
---
|
||||
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: log, author, date_
|
||||
|
||||
@@ -25,17 +25,12 @@ git log -p -- filename.txt
|
||||
1. Shows each commit and the actual changes made to `filename.txt`.
|
||||
|
||||
|
||||
#### Tags
|
||||
`log`, `diff`, `file`
|
||||
|
||||
#### Related Commands
|
||||
- git log --oneline -- filename.txt
|
||||
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
|
||||
[➡️ See the Next Step: Show Commit History With Author and Date](./show-commit-history-with-author-and-date.md)
|
||||
|
||||
---
|
||||
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: log, diff, file_
|
||||
|
||||
@@ -23,13 +23,8 @@ cd ../feature-branch
|
||||
1. Simply cd into the worktree directory to switch.
|
||||
|
||||
|
||||
#### Tags
|
||||
`worktree`, `switch`
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
|
||||
[➡️ See the Next Step: Use Worktrees for Temporary Fixes](./use-worktrees-for-temporary-fixes.md)
|
||||
|
||||
---
|
||||
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: worktree, switch_
|
||||
|
||||
@@ -25,13 +25,8 @@ git worktree add ../hotfix hotfix-branch
|
||||
1. Quickly apply a fix on another branch without leaving your main branch.
|
||||
|
||||
|
||||
#### Tags
|
||||
`worktree`, `hotfix`
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
|
||||
[➡️ See the Next Step: Flags and Their Uses](./flags-and-their-uses.md)
|
||||
|
||||
---
|
||||
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: worktree, hotfix_
|
||||
|
||||
@@ -9,15 +9,6 @@
|
||||
A collection of lesser-known but powerful Git commands. Use these to level up your Git workflow!
|
||||
|
||||
|
||||
#### Tags
|
||||
`rare`, `advanced`, `tips`
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
|
||||
---
|
||||
|
||||
### Subcommands
|
||||
@@ -51,3 +42,7 @@ mike-rambil
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
|
||||
|
||||
---
|
||||
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: rare, advanced, tips_
|
||||
|
||||
@@ -35,13 +35,8 @@ git branch -vv | grep -E '^\s*\S+\s+[^\[]+$' | awk '{print $1}' | xargs git bran
|
||||
- ⚠️ Deleting branches is irreversible. Double-check before running destructive commands.
|
||||
|
||||
|
||||
#### Tags
|
||||
`branches`, `cleanup`, `bash`
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
|
||||
[➡️ See the Next Step: View and Clean Up Local Git Branches (PowerShell)](./view-and-clean-up-local-git-branches-powershell.md)
|
||||
|
||||
---
|
||||
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: branches, cleanup, bash_
|
||||
|
||||
@@ -35,11 +35,6 @@ git branch -vv | Select-String -NotMatch "origin/" | ForEach-Object { $branch =
|
||||
- ⚠️ Deleting branches is irreversible. Double-check before running destructive commands.
|
||||
|
||||
|
||||
#### Tags
|
||||
`branches`, `cleanup`, `powershell`
|
||||
---
|
||||
|
||||
#### Author
|
||||
mike-rambil
|
||||
|
||||
#### Last Updated
|
||||
2024-06-10
|
||||
_Author: mike-rambil • Updated: 2024-06-10 • Tags: branches, cleanup, powershell_
|
||||
|
||||
Reference in New Issue
Block a user