From 4bbc712131b3713cfc5653cb843d451ade42ef64 Mon Sep 17 00:00:00 2001 From: mikerambil Date: Tue, 8 Jul 2025 19:50:46 -0500 Subject: [PATCH] ci: force retry --- contents/check-existing-worktrees.md | 27 --- contents/create-a-new-worktree.md | 31 ---- contents/flags-and-their-uses.md | 20 --- ...-remove-untracked-files-and-directories.md | 73 -------- contents/git-clone-mirror-repository.md | 29 --- contents/git-command-reference-full-list.md | 72 -------- contents/git-init-bare.md | 29 --- contents/git-maintenance-start.md | 33 ---- contents/git-replace-old-commit-new-commit.md | 29 --- contents/git-request-pull.md | 33 ---- ...to-use-git-push-force-with-lease-safely.md | 46 ----- contents/how-to-use-git-worktree-safely.md | 170 ------------------ .../miscellaneous-orphaned-git-commands.md | 152 ---------------- contents/past-commits-of-a-specific-file.md | 131 -------------- contents/remove-a-worktree.md | 31 ---- .../see-who-last-modified-each-line-blame.md | 31 ---- .../show-commit-history-of-a-specific-file.md | 32 ---- ...how-commit-history-with-author-and-date.md | 27 --- ...ow-detailed-commit-history-with-changes.md | 31 ---- contents/switch-between-worktrees.md | 27 --- contents/use-worktrees-for-temporary-fixes.md | 27 --- ...ul-rare-git-commands-you-never-heard-of.md | 47 ----- ...ew-and-clean-up-local-git-branches-bash.md | 40 ----- ...-clean-up-local-git-branches-powershell.md | 40 ----- 24 files changed, 1208 deletions(-) delete mode 100644 contents/check-existing-worktrees.md delete mode 100644 contents/create-a-new-worktree.md delete mode 100644 contents/flags-and-their-uses.md delete mode 100644 contents/git-clean-remove-untracked-files-and-directories.md delete mode 100644 contents/git-clone-mirror-repository.md delete mode 100644 contents/git-command-reference-full-list.md delete mode 100644 contents/git-init-bare.md delete mode 100644 contents/git-maintenance-start.md delete mode 100644 contents/git-replace-old-commit-new-commit.md delete mode 100644 contents/git-request-pull.md delete mode 100644 contents/how-to-use-git-push-force-with-lease-safely.md delete mode 100644 contents/how-to-use-git-worktree-safely.md delete mode 100644 contents/miscellaneous-orphaned-git-commands.md delete mode 100644 contents/past-commits-of-a-specific-file.md delete mode 100644 contents/remove-a-worktree.md delete mode 100644 contents/see-who-last-modified-each-line-blame.md delete mode 100644 contents/show-commit-history-of-a-specific-file.md delete mode 100644 contents/show-commit-history-with-author-and-date.md delete mode 100644 contents/show-detailed-commit-history-with-changes.md delete mode 100644 contents/switch-between-worktrees.md delete mode 100644 contents/use-worktrees-for-temporary-fixes.md delete mode 100644 contents/useful-rare-git-commands-you-never-heard-of.md delete mode 100644 contents/view-and-clean-up-local-git-branches-bash.md delete mode 100644 contents/view-and-clean-up-local-git-branches-powershell.md diff --git a/contents/check-existing-worktrees.md b/contents/check-existing-worktrees.md deleted file mode 100644 index 5f9a150..0000000 --- a/contents/check-existing-worktrees.md +++ /dev/null @@ -1,27 +0,0 @@ -# Check Existing Worktrees - - -#### Category -Worktree -**Command:** `git worktree list` - -#### Examples -- **List all active worktrees.** - - ```sh -git worktree list -``` - - -#### Steps -1. List all active worktrees. - - -#### Tags - [1mworktree [0m, [1mlist [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 diff --git a/contents/create-a-new-worktree.md b/contents/create-a-new-worktree.md deleted file mode 100644 index 95bcc02..0000000 --- a/contents/create-a-new-worktree.md +++ /dev/null @@ -1,31 +0,0 @@ -# Create a New Worktree - - -#### Category -Worktree -**Command:** `git worktree add ` - -#### Examples -- **Create a new worktree for the feature branch.** - - ```sh -git worktree add ../feature-branch feature -``` - - -#### Steps -1. Create a worktree linked to a specific branch. - - -#### Prerequisites -- The target path must not already be a git repository. - - -#### Tags - [1mworktree [0m, [1madd [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 diff --git a/contents/flags-and-their-uses.md b/contents/flags-and-their-uses.md deleted file mode 100644 index c1406b2..0000000 --- a/contents/flags-and-their-uses.md +++ /dev/null @@ -1,20 +0,0 @@ -# Flags and Their Uses - - -#### Flags -- `add`: Creates a new worktree for an existing branch. -- `-b`: Creates a new worktree with a new branch. -- `list`: Lists all active worktrees. -- `remove`: Detaches a worktree from the repo without deleting files. -- `prune`: Cleans up stale worktree references after manual deletion. -- `move`: Moves a worktree to a different location. - - -#### Tags - [1mworktree [0m, [1mflags [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 diff --git a/contents/git-clean-remove-untracked-files-and-directories.md b/contents/git-clean-remove-untracked-files-and-directories.md deleted file mode 100644 index c6b2766..0000000 --- a/contents/git-clean-remove-untracked-files-and-directories.md +++ /dev/null @@ -1,73 +0,0 @@ -# Git Clean: Remove Untracked Files and Directories - - -#### Category -Stashing and Cleaning -> Remove untracked files and directories from your repository. - -`git clean` is a powerful command that helps remove untracked files and directories from your repository. It is particularly useful when you want to reset your working directory without affecting committed files. - -**Command:** `git clean` - -#### Flags -- `-n`: Shows what will be deleted without actually deleting anything. -- `-f`: Forces deletion of untracked files. -- `-d`: Deletes untracked directories. -- `-i`: Interactive mode to selectively delete files. -- `-x`: Removes ignored and untracked files. -- `-X`: Removes only ignored files. - - -#### Examples -- **Preview what will be deleted (dry run).** - - ```sh -git clean -n -d -``` -- **Delete all untracked files.** - - ```sh -git clean -f -``` -- **Delete all untracked files and directories.** - - ```sh -git clean -f -d -``` -- **Interactive mode for selective deletion.** - - ```sh -git clean -i -``` - - -#### Steps -1. Preview deletions: `git clean -n -d` -2. Delete untracked files: `git clean -f` -3. Delete untracked files and directories: `git clean -f -d` -4. Interactive deletion: `git clean -i` -5. Remove ignored and untracked files: `git clean -f -x` -6. Remove only ignored files: `git clean -f -X` - - -#### Prerequisites -- Make sure you have committed all important changes. - - -#### Warnings -- ⚠️ This will permanently delete files! Always use `-n` before `-f`. -- ⚠️ Be cautious with `-x` and `-X` as they remove ignored files, which might include config files. - - -#### Links -- [Official Docs](https://git-scm.com/docs/git-clean) - - -#### Tags - [1mclean [0m, [1muntracked [0m, [1mworkspace [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 diff --git a/contents/git-clone-mirror-repository.md b/contents/git-clone-mirror-repository.md deleted file mode 100644 index 5e2181e..0000000 --- a/contents/git-clone-mirror-repository.md +++ /dev/null @@ -1,29 +0,0 @@ -# git clone --mirror - - -#### Category -Repository Management -> Clone a repository in mirror mode, including all refs and branches. - -**Command:** `git clone --mirror https://github.com/example/repo.git` - -#### Examples -- **Create a full backup or migration of a repository.** - - ```sh -git clone --mirror https://github.com/example/repo.git -``` - - -#### Steps -1. Run `git clone --mirror ` to create a full backup or migration. - - -#### Tags - [1mclone [0m, [1mmirror [0m, [1mbackup [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 diff --git a/contents/git-command-reference-full-list.md b/contents/git-command-reference-full-list.md deleted file mode 100644 index 0d1e253..0000000 --- a/contents/git-command-reference-full-list.md +++ /dev/null @@ -1,72 +0,0 @@ -# Git Command Reference (Full List) - - -#### Category -Reference -> A comprehensive list of Git commands used in this project. - -A comprehensive list of Git commands used in this project, formatted according to our standard. - - -#### Tags - [1mreference [0m, [1mall-commands [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 - ---- - -### Subcommands -#### git init --bare -Initialize a bare repository, typically used for remote repositories. -- `git init --bare my-repo.git` - -#### Examples -- **Create a bare repository for collaboration.** - - ```sh -git init --bare my-repo.git -``` - - -#### Steps -1. Run `git init --bare my-repo.git` to create a bare repository. - - -#### Tags - [1minit [0m, [1mbare [0m, [1mrepository [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 - -#### git clone --mirror -Clone a repository in mirror mode, including all refs and branches. -- `git clone --mirror https://github.com/example/repo.git` - -#### Examples -- **Create a full backup or migration of a repository.** - - ```sh -git clone --mirror https://github.com/example/repo.git -``` - - -#### Steps -1. Run `git clone --mirror ` to create a full backup or migration. - - -#### Tags - [1mclone [0m, [1mmirror [0m, [1mbackup [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 - diff --git a/contents/git-init-bare.md b/contents/git-init-bare.md deleted file mode 100644 index 8d5bbf5..0000000 --- a/contents/git-init-bare.md +++ /dev/null @@ -1,29 +0,0 @@ -# git init --bare - - -#### Category -Repository Management -> Initialize a bare repository, typically used for remote repositories. - -**Command:** `git init --bare my-repo.git` - -#### Examples -- **Create a bare repository for collaboration.** - - ```sh -git init --bare my-repo.git -``` - - -#### Steps -1. Run `git init --bare my-repo.git` to create a bare repository. - - -#### Tags - [1minit [0m, [1mbare [0m, [1mrepository [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 diff --git a/contents/git-maintenance-start.md b/contents/git-maintenance-start.md deleted file mode 100644 index 3aced7f..0000000 --- a/contents/git-maintenance-start.md +++ /dev/null @@ -1,33 +0,0 @@ -# git maintenance start - - -#### Category -Maintenance -> Runs a cronJob in background for the specified repo for periodic maintenance. - -**Command:** `git maintenance start` - -#### Examples -- **Enable background maintenance for your repository.** - - ```sh -git maintenance start -``` - - -#### Steps -1. Run `git maintenance start` in your repository. - - -#### Links -- [Official Docs](https://git-scm.com/docs/git-maintenance) - - -#### Tags - [1mmaintenance [0m, [1mautomation [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 diff --git a/contents/git-replace-old-commit-new-commit.md b/contents/git-replace-old-commit-new-commit.md deleted file mode 100644 index 23bcd1e..0000000 --- a/contents/git-replace-old-commit-new-commit.md +++ /dev/null @@ -1,29 +0,0 @@ -# git replace - - -#### Category -History -> Temporarily substitute one commit for another. - -**Command:** `git replace abc123 def456` - -#### Examples -- **Temporarily replace commit abc123 with def456.** - - ```sh -git replace abc123 def456 -``` - - -#### Steps -1. Run `git replace ` to test or patch history. - - -#### Tags - [1mreplace [0m, [1mhistory [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 diff --git a/contents/git-request-pull.md b/contents/git-request-pull.md deleted file mode 100644 index e2f65fc..0000000 --- a/contents/git-request-pull.md +++ /dev/null @@ -1,33 +0,0 @@ -# git request-pull - - -#### Category -Collaboration -> Generate a request to pull changes into a repository. - -**Command:** `git request-pull ` - -#### Examples -- **Generate a pull request message from v1.0 to v1.1.** - - ```sh -git request-pull v1.0 https://github.com/example/repo.git v1.1 -``` - - -#### Steps -1. Run `git request-pull ` to generate a pull request message. - - -#### Links -- [Official Docs](https://git-scm.com/docs/git-request-pull) - - -#### Tags - [1mcollaboration [0m, [1mpull-request [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 diff --git a/contents/how-to-use-git-push-force-with-lease-safely.md b/contents/how-to-use-git-push-force-with-lease-safely.md deleted file mode 100644 index eec4e16..0000000 --- a/contents/how-to-use-git-push-force-with-lease-safely.md +++ /dev/null @@ -1,46 +0,0 @@ -# How to Use git push --force-with-lease Safely - - -#### Category -Collaboration -> Safely force-push to a branch without overwriting others' work. - -Guide to using `git push --force-with-lease` to avoid overwriting others' work when force-pushing. - -**Command:** `git push --force-with-lease` - -#### Examples -- **Safely force-push your changes.** - - ```sh -git push --force-with-lease -``` - - -#### Steps -1. Fetch the latest changes: `git fetch origin` -2. Push with lease: `git push --force-with-lease` -3. If rejected, pull and rebase: `git pull --rebase origin main` -4. Resolve conflicts, commit, and retry push - - -#### Prerequisites -- You must have permission to push to the branch. - - -#### Warnings -- ⚠️ Never use `--force` unless you are sure. Prefer `--force-with-lease`. - - -#### Links -- [Medium Article](https://medium.com/@sahilsahilbhatia/git-push-force-with-lease-vs-force-ecae72601e80) - - -#### Tags - [1mpush [0m, [1mforce [0m, [1msafe [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 diff --git a/contents/how-to-use-git-worktree-safely.md b/contents/how-to-use-git-worktree-safely.md deleted file mode 100644 index d41fb1c..0000000 --- a/contents/how-to-use-git-worktree-safely.md +++ /dev/null @@ -1,170 +0,0 @@ -# How to Use git worktree Safely - - -#### Category -Worktree -> Work on multiple branches simultaneously without switching. - -`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 - [1mworktree [0m, [1mbranches [0m, [1madvanced [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 - ---- - -### Subcommands -#### Check Existing Worktrees -- `git worktree list` - -#### Examples -- **List all active worktrees.** - - ```sh -git worktree list -``` - - -#### Steps -1. List all active worktrees. - - -#### Tags - [1mworktree [0m, [1mlist [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 - -#### Create a New Worktree -- `git worktree add ` - -#### Examples -- **Create a new worktree for the feature branch.** - - ```sh -git worktree add ../feature-branch feature -``` - - -#### Steps -1. Create a worktree linked to a specific branch. - - -#### Prerequisites -- The target path must not already be a git repository. - - -#### Tags - [1mworktree [0m, [1madd [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 - -#### Remove a Worktree -- `git worktree remove ` - -#### Examples -- **Detach a worktree without deleting the files.** - - ```sh -git worktree remove ../feature-branch -``` - - -#### Steps -1. Detach a worktree without deleting the files. - - -#### Warnings -- ⚠️ Make sure you have committed all changes before removing a worktree. - - -#### Tags - [1mworktree [0m, [1mremove [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 - -#### Switch Between Worktrees -- `cd ` - -#### Examples -- **Switch to the worktree directory.** - - ```sh -cd ../feature-branch -``` - - -#### Steps -1. Simply cd into the worktree directory to switch. - - -#### Tags - [1mworktree [0m, [1mswitch [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 - -#### Use Worktrees for Temporary Fixes -- `git worktree add ../hotfix hotfix-branch` - -#### Examples -- **Quickly apply a fix on another branch without leaving your main branch.** - - ```sh -git worktree add ../hotfix hotfix-branch -``` - - -#### Steps -1. Quickly apply a fix on another branch without leaving your main branch. - - -#### Tags - [1mworktree [0m, [1mhotfix [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 - -#### Flags and Their Uses - -#### Flags -- `add`: Creates a new worktree for an existing branch. -- `-b`: Creates a new worktree with a new branch. -- `list`: Lists all active worktrees. -- `remove`: Detaches a worktree from the repo without deleting files. -- `prune`: Cleans up stale worktree references after manual deletion. -- `move`: Moves a worktree to a different location. - - -#### Tags - [1mworktree [0m, [1mflags [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 - diff --git a/contents/miscellaneous-orphaned-git-commands.md b/contents/miscellaneous-orphaned-git-commands.md deleted file mode 100644 index f2dac24..0000000 --- a/contents/miscellaneous-orphaned-git-commands.md +++ /dev/null @@ -1,152 +0,0 @@ -# Miscellaneous & Orphaned Git Commands - - -#### Category -Miscellaneous -> Useful Git commands and scripts not referenced elsewhere. - -This file collects useful Git commands and scripts that were previously only in the README and not referenced elsewhere in this repository. - - -#### Tags - [1mmisc [0m, [1mcleanup [0m, [1madvanced [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 - ---- - -### Subcommands -#### git maintenance start -Runs a cronJob in background for the specified repo for periodic maintenance. -- `git maintenance start` - -#### Examples -- **Enable background maintenance for your repository.** - - ```sh -git maintenance start -``` - - -#### Steps -1. Run `git maintenance start` in your repository. - - -#### Links -- [Official Docs](https://git-scm.com/docs/git-maintenance) - - -#### Tags - [1mmaintenance [0m, [1mautomation [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 - -#### git request-pull -Generate a request to pull changes into a repository. -- `git request-pull ` - -#### Examples -- **Generate a pull request message from v1.0 to v1.1.** - - ```sh -git request-pull v1.0 https://github.com/example/repo.git v1.1 -``` - - -#### Steps -1. Run `git request-pull ` to generate a pull request message. - - -#### Links -- [Official Docs](https://git-scm.com/docs/git-request-pull) - - -#### Tags - [1mcollaboration [0m, [1mpull-request [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 - -#### View and Clean Up Local Git Branches (Bash) -Scripts to view and clean up local branches using Bash. - -#### Examples -- **List local branches without a remote connection.** - - ```sh -git branch -vv | grep -E '^\s*\S+\s+[^\[]+$' -``` -- **Delete local branches without remote tracking.** - - ```sh -git branch -vv | grep -E '^\s*\S+\s+[^\[]+$' | awk '{print $1}' | xargs git branch -D -``` - - -#### Steps -1. List local branches. -2. Delete local branches without remote. -3. View branches with deleted remote. -4. Delete stale local branches. - - -#### Warnings -- ⚠️ Deleting branches is irreversible. Double-check before running destructive commands. - - -#### Tags - [1mbranches [0m, [1mcleanup [0m, [1mbash [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 - -#### View and Clean Up Local Git Branches (PowerShell) -Scripts to view and clean up local branches using PowerShell. - -#### Examples -- **List local branches without a remote connection.** - - ```sh -git branch -vv | Select-String -NotMatch "origin/" -``` -- **Delete local branches without remote tracking.** - - ```sh -git branch -vv | Select-String -NotMatch "origin/" | ForEach-Object { $branch = ($_ -split "\s+")[1]; git branch -D $branch } -``` - - -#### Steps -1. List local branches. -2. Delete local branches without remote. -3. View branches with deleted remote. -4. Delete stale local branches. - - -#### Warnings -- ⚠️ Deleting branches is irreversible. Double-check before running destructive commands. - - -#### Tags - [1mbranches [0m, [1mcleanup [0m, [1mpowershell [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 - diff --git a/contents/past-commits-of-a-specific-file.md b/contents/past-commits-of-a-specific-file.md deleted file mode 100644 index 7845a62..0000000 --- a/contents/past-commits-of-a-specific-file.md +++ /dev/null @@ -1,131 +0,0 @@ -# Past commits of a specific file - - -#### Category -History and Inspection -> See all commits and changes for a specific file. - -You can see all commits related to a specific file using Git commands. Here are a few ways to do it: - - -#### Tags - [1mhistory [0m, [1minspection [0m, [1mfile [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 - ---- - -### Subcommands -#### Show Commit History of a Specific File -- `git log --oneline -- filename.txt` - -#### Examples -- **List all commits that modified `filename.txt`.** - - ```sh -git log --oneline -- filename.txt -``` - - -#### Steps -1. Lists all commits that modified `filename.txt`. - - -#### Tags - [1mlog [0m, [1mfile [0m, [1mhistory [0m - -#### Related Commands -- git log -p -- filename.txt -- git blame filename.txt - - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 - -#### Show Detailed Commit History (With Changes) -- `git log -p -- filename.txt` - -#### Examples -- **Show each commit and the actual changes made to `filename.txt`.** - - ```sh -git log -p -- filename.txt -``` - - -#### Steps -1. Shows each commit and the actual changes made to `filename.txt`. - - -#### Tags - [1mlog [0m, [1mdiff [0m, [1mfile [0m - -#### Related Commands -- git log --oneline -- filename.txt - - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 - -#### Show Commit History With Author and Date -- `git log --pretty=format:"%h - %an, %ar : %s" -- filename.txt` - -#### Examples -- **Display commit hash, author, relative date, and commit message.** - - ```sh -git log --pretty=format:"%h - %an, %ar : %s" -- filename.txt -``` - - -#### Steps -1. Displays commit hash, author, relative date, and commit message. - - -#### Tags - [1mlog [0m, [1mauthor [0m, [1mdate [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 - -#### See Who Last Modified Each Line (Blame) -- `git blame filename.txt` - -#### Examples -- **Show the last commit that changed each line of the file.** - - ```sh -git blame filename.txt -``` - - -#### Steps -1. Shows the last commit that changed each line of the file. - - -#### Warnings -- ⚠️ Blame can be misleading if the file has been heavily refactored. - - -#### Tags - [1mblame [0m, [1mfile [0m, [1mhistory [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 - diff --git a/contents/remove-a-worktree.md b/contents/remove-a-worktree.md deleted file mode 100644 index 69620ad..0000000 --- a/contents/remove-a-worktree.md +++ /dev/null @@ -1,31 +0,0 @@ -# Remove a Worktree - - -#### Category -Worktree -**Command:** `git worktree remove ` - -#### Examples -- **Detach a worktree without deleting the files.** - - ```sh -git worktree remove ../feature-branch -``` - - -#### Steps -1. Detach a worktree without deleting the files. - - -#### Warnings -- ⚠️ Make sure you have committed all changes before removing a worktree. - - -#### Tags - [1mworktree [0m, [1mremove [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 diff --git a/contents/see-who-last-modified-each-line-blame.md b/contents/see-who-last-modified-each-line-blame.md deleted file mode 100644 index e765556..0000000 --- a/contents/see-who-last-modified-each-line-blame.md +++ /dev/null @@ -1,31 +0,0 @@ -# See Who Last Modified Each Line (Blame) - - -#### Category -History -**Command:** `git blame filename.txt` - -#### Examples -- **Show the last commit that changed each line of the file.** - - ```sh -git blame filename.txt -``` - - -#### Steps -1. Shows the last commit that changed each line of the file. - - -#### Warnings -- ⚠️ Blame can be misleading if the file has been heavily refactored. - - -#### Tags - [1mblame [0m, [1mfile [0m, [1mhistory [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 diff --git a/contents/show-commit-history-of-a-specific-file.md b/contents/show-commit-history-of-a-specific-file.md deleted file mode 100644 index bddd86b..0000000 --- a/contents/show-commit-history-of-a-specific-file.md +++ /dev/null @@ -1,32 +0,0 @@ -# Show Commit History of a Specific File - - -#### Category -History -**Command:** `git log --oneline -- filename.txt` - -#### Examples -- **List all commits that modified `filename.txt`.** - - ```sh -git log --oneline -- filename.txt -``` - - -#### Steps -1. Lists all commits that modified `filename.txt`. - - -#### Tags - [1mlog [0m, [1mfile [0m, [1mhistory [0m - -#### Related Commands -- git log -p -- filename.txt -- git blame filename.txt - - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 diff --git a/contents/show-commit-history-with-author-and-date.md b/contents/show-commit-history-with-author-and-date.md deleted file mode 100644 index f4a5694..0000000 --- a/contents/show-commit-history-with-author-and-date.md +++ /dev/null @@ -1,27 +0,0 @@ -# Show Commit History With Author and Date - - -#### Category -History -**Command:** `git log --pretty=format:"%h - %an, %ar : %s" -- filename.txt` - -#### Examples -- **Display commit hash, author, relative date, and commit message.** - - ```sh -git log --pretty=format:"%h - %an, %ar : %s" -- filename.txt -``` - - -#### Steps -1. Displays commit hash, author, relative date, and commit message. - - -#### Tags - [1mlog [0m, [1mauthor [0m, [1mdate [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 diff --git a/contents/show-detailed-commit-history-with-changes.md b/contents/show-detailed-commit-history-with-changes.md deleted file mode 100644 index f7a3196..0000000 --- a/contents/show-detailed-commit-history-with-changes.md +++ /dev/null @@ -1,31 +0,0 @@ -# Show Detailed Commit History (With Changes) - - -#### Category -History -**Command:** `git log -p -- filename.txt` - -#### Examples -- **Show each commit and the actual changes made to `filename.txt`.** - - ```sh -git log -p -- filename.txt -``` - - -#### Steps -1. Shows each commit and the actual changes made to `filename.txt`. - - -#### Tags - [1mlog [0m, [1mdiff [0m, [1mfile [0m - -#### Related Commands -- git log --oneline -- filename.txt - - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 diff --git a/contents/switch-between-worktrees.md b/contents/switch-between-worktrees.md deleted file mode 100644 index a72afd5..0000000 --- a/contents/switch-between-worktrees.md +++ /dev/null @@ -1,27 +0,0 @@ -# Switch Between Worktrees - - -#### Category -Worktree -**Command:** `cd ` - -#### Examples -- **Switch to the worktree directory.** - - ```sh -cd ../feature-branch -``` - - -#### Steps -1. Simply cd into the worktree directory to switch. - - -#### Tags - [1mworktree [0m, [1mswitch [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 diff --git a/contents/use-worktrees-for-temporary-fixes.md b/contents/use-worktrees-for-temporary-fixes.md deleted file mode 100644 index 30009d7..0000000 --- a/contents/use-worktrees-for-temporary-fixes.md +++ /dev/null @@ -1,27 +0,0 @@ -# Use Worktrees for Temporary Fixes - - -#### Category -Worktree -**Command:** `git worktree add ../hotfix hotfix-branch` - -#### Examples -- **Quickly apply a fix on another branch without leaving your main branch.** - - ```sh -git worktree add ../hotfix hotfix-branch -``` - - -#### Steps -1. Quickly apply a fix on another branch without leaving your main branch. - - -#### Tags - [1mworktree [0m, [1mhotfix [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 diff --git a/contents/useful-rare-git-commands-you-never-heard-of.md b/contents/useful-rare-git-commands-you-never-heard-of.md deleted file mode 100644 index ca3cece..0000000 --- a/contents/useful-rare-git-commands-you-never-heard-of.md +++ /dev/null @@ -1,47 +0,0 @@ -# Useful Rare Git Commands You Never Heard Of - - -#### Category -Advanced -> A collection of lesser-known but powerful Git commands. - -A collection of lesser-known but powerful Git commands. Use these to level up your Git workflow! - - -#### Tags - [1mrare [0m, [1madvanced [0m, [1mtips [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 - ---- - -### Subcommands -#### git replace -Temporarily substitute one commit for another. -- `git replace abc123 def456` - -#### Examples -- **Temporarily replace commit abc123 with def456.** - - ```sh -git replace abc123 def456 -``` - - -#### Steps -1. Run `git replace ` to test or patch history. - - -#### Tags - [1mreplace [0m, [1mhistory [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 - diff --git a/contents/view-and-clean-up-local-git-branches-bash.md b/contents/view-and-clean-up-local-git-branches-bash.md deleted file mode 100644 index b8ee0a8..0000000 --- a/contents/view-and-clean-up-local-git-branches-bash.md +++ /dev/null @@ -1,40 +0,0 @@ -# View and Clean Up Local Git Branches (Bash) - - -#### Category -Branch Management -> Scripts to view and clean up local branches using Bash. - - -#### Examples -- **List local branches without a remote connection.** - - ```sh -git branch -vv | grep -E '^\s*\S+\s+[^\[]+$' -``` -- **Delete local branches without remote tracking.** - - ```sh -git branch -vv | grep -E '^\s*\S+\s+[^\[]+$' | awk '{print $1}' | xargs git branch -D -``` - - -#### Steps -1. List local branches. -2. Delete local branches without remote. -3. View branches with deleted remote. -4. Delete stale local branches. - - -#### Warnings -- ⚠️ Deleting branches is irreversible. Double-check before running destructive commands. - - -#### Tags - [1mbranches [0m, [1mcleanup [0m, [1mbash [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10 diff --git a/contents/view-and-clean-up-local-git-branches-powershell.md b/contents/view-and-clean-up-local-git-branches-powershell.md deleted file mode 100644 index 9f7416b..0000000 --- a/contents/view-and-clean-up-local-git-branches-powershell.md +++ /dev/null @@ -1,40 +0,0 @@ -# View and Clean Up Local Git Branches (PowerShell) - - -#### Category -Branch Management -> Scripts to view and clean up local branches using PowerShell. - - -#### Examples -- **List local branches without a remote connection.** - - ```sh -git branch -vv | Select-String -NotMatch "origin/" -``` -- **Delete local branches without remote tracking.** - - ```sh -git branch -vv | Select-String -NotMatch "origin/" | ForEach-Object { $branch = ($_ -split "\s+")[1]; git branch -D $branch } -``` - - -#### Steps -1. List local branches. -2. Delete local branches without remote. -3. View branches with deleted remote. -4. Delete stale local branches. - - -#### Warnings -- ⚠️ Deleting branches is irreversible. Double-check before running destructive commands. - - -#### Tags - [1mbranches [0m, [1mcleanup [0m, [1mpowershell [0m - -#### Author -mike-rambil - -#### Last Updated -2024-06-10