> For the complete documentation index, see [llms.txt](https://ploegert.gitbook.io/til/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ploegert.gitbook.io/til/tools/git.md).

# git

- [Accessing a Lost Commit](https://ploegert.gitbook.io/til/tools/git/accessing-a-lost-commit.md)
- [Amend Author Of Previous Commit](https://ploegert.gitbook.io/til/tools/git/amend-author-of-previous-commit.md)
- [Auto-Squash Those Fixup Commits](https://ploegert.gitbook.io/til/tools/git/auto-squash-those-fixup-commits.md)
- [Caching Credentials](https://ploegert.gitbook.io/til/tools/git/caching-credentials.md)
- [Change The Start Point Of A Branch](https://ploegert.gitbook.io/til/tools/git/change-the-start-point-of-a-branch.md)
- [Checking Commit Ancestry](https://ploegert.gitbook.io/til/tools/git/checking-commit-ancestry.md)
- [Checkout Old Version Of A File](https://ploegert.gitbook.io/til/tools/git/checkout-old-version-of-a-file.md)
- [Checkout Previous Branch](https://ploegert.gitbook.io/til/tools/git/checkout-previous-branch.md)
- [Cherry Pick A Range Of Commits](https://ploegert.gitbook.io/til/tools/git/cherry-pick-a-range-of-commits.md)
- [Clean Out All Local Branches](https://ploegert.gitbook.io/til/tools/git/clean-out-all-local-branches.md)
- [Clean Out Working Copy With Patched Restore](https://ploegert.gitbook.io/til/tools/git/clean-out-working-copy-with-patched-restore.md)
- [Clean Up Old Remote Tracking References](https://ploegert.gitbook.io/til/tools/git/clean-up-old-remote-tracking-references.md)
- [Clone A Repo Just For The Files, Without History](https://ploegert.gitbook.io/til/tools/git/clone-a-repo-just-for-the-files-without-history.md)
- [Clone A Repo Locally From .git](https://ploegert.gitbook.io/til/tools/git/clone-a-repo-locally-from-git.md)
- [Configure Global gitignore File](https://ploegert.gitbook.io/til/tools/git/configure-global-gitignore-file.md)
- [Configuring The Pager](https://ploegert.gitbook.io/til/tools/git/configuring-the-pager.md)
- [Copy A File From Another Branch](https://ploegert.gitbook.io/til/tools/git/copy-a-file-from-another-branch.md)
- [Create A New Branch With Git Switch](https://ploegert.gitbook.io/til/tools/git/create-a-new-branch-with-git-switch.md)
- [Delete All Untracked Files](https://ploegert.gitbook.io/til/tools/git/delete-all-untracked-files.md)
- [Determine The Hash Id For A Blob](https://ploegert.gitbook.io/til/tools/git/determine-the-hash-id-for-a-blob.md)
- [Diffing With Patience](https://ploegert.gitbook.io/til/tools/git/diffing-with-patience.md)
- [Dropping Commits With Git Rebase](https://ploegert.gitbook.io/til/tools/git/dropping-commits-with-git-rebase.md)
- [Dry Runs in Git](https://ploegert.gitbook.io/til/tools/git/dry-runs-in-git.md)
- [Exclude A File From A Diff Output](https://ploegert.gitbook.io/til/tools/git/exclude-a-file-from-a-diff-output.md)
- [Excluding Files Locally](https://ploegert.gitbook.io/til/tools/git/excluding-files-locally.md)
- [Find The Date That A File Was Added To The Repo](https://ploegert.gitbook.io/til/tools/git/find-the-date-that-a-file-was-added-to-the-repo.md)
- [Find The Initial Commit](https://ploegert.gitbook.io/til/tools/git/find-the-initial-commit.md)
- [Get The Name Of The Current Branch](https://ploegert.gitbook.io/til/tools/git/get-the-name-of-the-current-branch.md)
- [Get The Short Version Of The Latest Commit](https://ploegert.gitbook.io/til/tools/git/get-the-short-version-of-the-latest-commit.md)
- [Grab A Single File From A Stash](https://ploegert.gitbook.io/til/tools/git/grab-a-single-file-from-a-stash.md)
- [Grep For A Pattern On Another Branch](https://ploegert.gitbook.io/til/tools/git/grep-for-a-pattern-on-another-branch.md)
- [Grep Over Commit Messages](https://ploegert.gitbook.io/til/tools/git/grep-over-commit-messages.md)
- [Ignore Changes To A Tracked File](https://ploegert.gitbook.io/til/tools/git/ignore-changes-to-a-tracked-file.md)
- [Ignore Files Specific To Your Workflow](https://ploegert.gitbook.io/til/tools/git/ignore-files-specific-to-your-workflow.md)
- [Include A Message With Your Stashed Changes](https://ploegert.gitbook.io/til/tools/git/include-a-message-with-your-stashed-changes.md)
- [Include Or Exclude Remaining Patch Changes](https://ploegert.gitbook.io/til/tools/git/include-or-exclude-remaining-patch-changes.md)
- [Include Some Stats In Your Git Log](https://ploegert.gitbook.io/til/tools/git/include-some-stats-in-your-git-log.md)
- [Intent To Add](https://ploegert.gitbook.io/til/tools/git/intent-to-add.md)
- [Interactively Unstage Changes](https://ploegert.gitbook.io/til/tools/git/interactively-unstage-changes.md)
- [Last Commit A File Appeared In](https://ploegert.gitbook.io/til/tools/git/last-commit-a-file-appeared-in.md)
- [List All Files Changed Between Two Branches](https://ploegert.gitbook.io/til/tools/git/list-all-files-changed-between-two-branches.md)
- [List Branches That Contain A Commit](https://ploegert.gitbook.io/til/tools/git/list-branches-that-contain-a-commit.md)
- [List Commits On A Branch](https://ploegert.gitbook.io/til/tools/git/list-commits-on-a-branch.md)
- [List Different Commits Between Two Branches](https://ploegert.gitbook.io/til/tools/git/list-different-commits-between-two-branches.md)
- [List Filenames Without The Diffs](https://ploegert.gitbook.io/til/tools/git/list-filenames-without-the-diffs.md)
- [List Just The Files Involved In A Commit](https://ploegert.gitbook.io/til/tools/git/list-just-the-files-involved-in-a-commit.md)
- [List Most Git Commands](https://ploegert.gitbook.io/til/tools/git/list-most-git-commands.md)
- [List Untracked Files](https://ploegert.gitbook.io/til/tools/git/list-untracked-files.md)
- [List Untracked Files For Scripting](https://ploegert.gitbook.io/til/tools/git/list-untracked-files-for-scripting.md)
- [Move The Latest Commit To A New Branch](https://ploegert.gitbook.io/til/tools/git/move-the-latest-commit-to-a-new-branch.md)
- [Pick Specific Changes To Stash](https://ploegert.gitbook.io/til/tools/git/pick-specific-changes-to-stash.md)
- [Pulling In Changes During An Interactive Rebase](https://ploegert.gitbook.io/til/tools/git/pulling-in-changes-during-an-interactive-rebase.md)
- [Push To A Branch On Another Remote](https://ploegert.gitbook.io/til/tools/git/push-to-a-branch-on-another-remote.md)
- [Quicker Commit Fixes With The Fixup Flag](https://ploegert.gitbook.io/til/tools/git/quicker-commit-fixes-with-the-fixup-flag.md)
- [Rebase Commits With An Arbitrary Command](https://ploegert.gitbook.io/til/tools/git/rebase-commits-with-an-arbitrary-command.md)
- [Reference A Commit Via Commit Message Pattern Matching](https://ploegert.gitbook.io/til/tools/git/reference-a-commit-via-commit-message-pattern-matching.md)
- [Rename A Remote](https://ploegert.gitbook.io/til/tools/git/rename-a-remote.md)
- [Renaming A Branch](https://ploegert.gitbook.io/til/tools/git/renaming-a-branch.md)
- [Resetting A Reset](https://ploegert.gitbook.io/til/tools/git/resetting-a-reset.md)
- [Resolve A Merge Conflict From Stash Pop](https://ploegert.gitbook.io/til/tools/git/resolve-a-merge-conflict-from-stash-pop.md)
- [Run A Git Command From Outside The Repo](https://ploegert.gitbook.io/til/tools/git/run-a-git-command-from-outside-the-repo.md)
- [Set A Custom Pager For A Specific Command](https://ploegert.gitbook.io/til/tools/git/set-a-custom-pager-for-a-specific-command.md)
- [Show All Commits For A File Beyond Renaming](https://ploegert.gitbook.io/til/tools/git/show-all-commits-for-a-file-beyond-renaming.md)
- [Show Changes For Files That Match A Pattern](https://ploegert.gitbook.io/til/tools/git/show-changes-for-files-that-match-a-pattern.md)
- [Show Changes In The Compose Commit Message View](https://ploegert.gitbook.io/til/tools/git/show-changes-in-the-compose-commit-message-view.md)
- [Show File Diffs When Viewing Git Log](https://ploegert.gitbook.io/til/tools/git/show-file-diffs-when-viewing-git-log.md)
- [Show List Of Most Recently Committed Branches](https://ploegert.gitbook.io/til/tools/git/show-list-of-most-recently-committed-branches.md)
- [Show Only Commits That Touch Specific Lines](https://ploegert.gitbook.io/til/tools/git/show-only-commits-that-touch-specific-lines.md)
- [Show The diffstat Summary Of A Commit](https://ploegert.gitbook.io/til/tools/git/show-the-diffstat-summary-of-a-commit.md)
- [Show The Good And The Bad With Git Bisect](https://ploegert.gitbook.io/til/tools/git/show-the-good-and-the-bad-with-git-bisect.md)
- [Show What Is In A Stash](https://ploegert.gitbook.io/til/tools/git/show-what-is-in-a-stash.md)
- [Single Key Presses in Interactive Mode](https://ploegert.gitbook.io/til/tools/git/single-key-presses-in-interactive-mode.md)
- [Skip A Bad Commit When Bisecting](https://ploegert.gitbook.io/til/tools/git/skip-a-bad-commit-when-bisecting.md)
- [Skip Pre-Commit Hooks](https://ploegert.gitbook.io/til/tools/git/skip-pre-commit-hooks.md)
- [Staging Changes Within Vim](https://ploegert.gitbook.io/til/tools/git/staging-changes-within-vim.md)
- [Staging Stashes Interactively](https://ploegert.gitbook.io/til/tools/git/staging-stashes-interactively.md)
- [Stash A Single Untracked File](https://ploegert.gitbook.io/til/tools/git/stash-a-single-untracked-file.md)
- [Stash Everything](https://ploegert.gitbook.io/til/tools/git/stash-everything.md)
- [Stashing Only Unstaged Changes](https://ploegert.gitbook.io/til/tools/git/stashing-only-unstaged-changes.md)
- [Stashing Untracked Files](https://ploegert.gitbook.io/til/tools/git/stashing-untracked-files.md)
- [Switch To A Recent Branch With FZF](https://ploegert.gitbook.io/til/tools/git/switch-to-a-recent-branch-with-fzf.md)
- [Turn Off The Output Pager For One Command](https://ploegert.gitbook.io/til/tools/git/turn-off-the-output-pager-for-one-command.md)
- [Two Kinds Of Dotted Range Notation](https://ploegert.gitbook.io/til/tools/git/two-kinds-of-dotted-range-notation.md)
- [Unstage Changes Wih Git Restore](https://ploegert.gitbook.io/til/tools/git/unstage-changes-with-git-restore.md)
- [Untrack A Directory Of Files Without Deleting](https://ploegert.gitbook.io/til/tools/git/untrack-a-directory-of-files-without-deleting.md)
- [Untrack A File Without Deleting It](https://ploegert.gitbook.io/til/tools/git/untrack-a-file-without-deleting-it.md)
- [Update The URL Of A Remote](https://ploegert.gitbook.io/til/tools/git/update-the-url-of-a-remote.md)
- [Using Commands With A Relative Date Format](https://ploegert.gitbook.io/til/tools/git/using-commands-with-a-relative-date-format.md)
- [Verbose Commit Message](https://ploegert.gitbook.io/til/tools/git/verbose-commit-message.md)
- [Viewing A File On Another Branch](https://ploegert.gitbook.io/til/tools/git/viewing-a-file-on-another-branch.md)
- [What Changed?](https://ploegert.gitbook.io/til/tools/git/what-changed.md)
- [What Is The Current Branch?](https://ploegert.gitbook.io/til/tools/git/what-is-the-current-branch.md)
- [Whitespace Warnings](https://ploegert.gitbook.io/til/tools/git/whitespace-warnings.md)
- [Import A Github Project Into CodeSandbox](https://ploegert.gitbook.io/til/tools/git/import-a-github-project-into-codesandbox.md)
- [View The PR For The Current GitHub Branch](https://ploegert.gitbook.io/til/tools/git/view-the-pr-for-the-current-github-branch.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ploegert.gitbook.io/til/tools/git.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
