git-tips

Collection of git-tips, want to add your tips? Checkout contributing.md

English | 中文 | Русский | 한국어 | Tiếng Việt | 日本語 | नेपाली | Polski | فارسی

Tools:

P.S: All these commands are tested on git version 2.7.4 (Apple Git-66).

Everyday Git in twenty commands or so

git help everyday

Show helpful guides that come with Git

git help -g

Search change by content

git log -S'<a term in the source>'

Show changes over time for specific file

git log -p <file_name>

Remove sensitive data from history, after a push

git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch <path-to-your-file>' --prune-empty --tag-name-filter cat -- --all && git push origin --force --all

Sync with remote, overwrite local changes

git fetch origin && git reset --hard origin/master && git clean -f -d

List of all files till a commit

git ls-tree --name-only -r <commit-ish>

Git reset first commit

git update-ref -d HEAD

Reset: preserve uncommitted local changes

git reset --keep <commit>

List all the conflicted files

git diff --name-only --diff-filter=U

List of all files changed in a commit

git diff-tree --no-commit-id --name-only -r <commit-ish>

Unstaged changes since last commit

git diff

Changes staged for commit

git diff --cached

Alternatives:

git diff --staged

Show both staged and unstaged changes

git diff HEAD

List all branches that are already merged into master

git branch --merged master

Quickly switch to the previous branch

git checkout -

Alternatives:

git checkout @{-1}

Remove branches that have already been merged with master

git branch --merged master | grep -v '^\*' | xargs -n 1 git branch -d

Alternatives:

git branch --merged master | grep -v '^\*\|  master' | xargs -n 1 git branch -d # will not delete master if master is not checked out

List all branches and their upstreams, as well as last commit on branch

git branch -vv

Track upstream branch

git branch -u origin/mybranch

Delete local branch

git branch -d <local_branchname>

Delete remote branch

git push origin --delete <remote_branchname>

Alternatives:

git push origin :<remote_branchname>
git branch -dr <remote/branch>

Create local tag

git tag <tag-name>

Delete local tag

git tag -d <tag-name>

Delete remote tag

git push origin :refs/tags/<tag-name>

Undo local changes with the content in index(staging)

git checkout -- <file_name>

Revert: Undo a commit by creating a new commit

git revert <commit-ish>

Reset: Discard commits, advised for private branch

git reset <commit-ish>

Reword the previous commit message

git commit -v --amend

See commit history for just the current branch

git cherry -v master

Amend author.

git commit --amend --author='Author Name <[email protected]>'

Reset author, after author has been changed in the global config.

git commit --amend --reset-author --no-edit

Changing a remote's URL

git remote set-url origin <URL>

Get list of all remote references

git remote

Alternatives:

git remote show

Get list of all local and remote branches

git branch -a

Get only remote branches

git branch -r

Stage parts of a changed file, instead of the entire file

git add -p

Get git bash completion

curl -L http://git.io/vfhol > ~/.git-completion.bash && echo '[ -f ~/.git-completion.bash ] && . ~/.git-completion.bash' >> ~/.bashrc

What changed since two weeks?

git log --no-merges --raw --since='2 weeks ago'

Alternatives:

git whatchanged --since='2 weeks ago'

See all commits made since forking from master

git log --no-merges --stat --reverse master..

Pick commits across branches using cherry-pick

git checkout <branch-name> && git cherry-pick <commit-ish>

Find out branches containing commit-hash

git branch -a --contains <commit-ish>

Alternatives:

git branch --contains <commit-ish>

Git Aliases

git config --global alias.<handle> <command> 
git config --global alias.st status

Saving current state of tracked files without commiting

git stash

Alternatives:

git stash push

Saving current state of unstaged changes to tracked files

git stash -k

Alternatives:

git stash --keep-index
git stash push --keep-index

Saving current state including untracked files

git stash -u

Alternatives:

git stash push -u
git stash push --include-untracked

Saving current state with message

git stash push -m <message>

Alternatives:

git stash push --message <message>

Saving current state of all files (ignored, untracked, and tracked)

git stash -a

Alternatives:

git stash --all
git stash push --all

Show list of all saved stashes

git stash list

Show the contents of any stash in patch form

git stash show -p <stash@{n}>

Apply any stash without deleting from the stashed list

git stash apply <stash@{n}>

Apply last stashed state and delete it from stashed list

git stash pop

Alternatives:

git stash apply stash@{0} && git stash drop stash@{0}

Delete all stored stashes

git stash clear

Alternatives:

git stash drop <stash@{n}>

Grab a single file from a stash

git checkout <stash@{n}> -- <file_path>

Alternatives:

git checkout stash@{0} -- <file_path>

Show all tracked files

git ls-files -t

Show all untracked files

git ls-files --others

Show all ignored files

git ls-files --others -i --exclude-standard

Create new working tree from a repository (git 2.5)

git worktree add -b <branch-name> <path> <start-point>

Create new working tree from HEAD state

git worktree add --detach <path> HEAD

Untrack files without deleting

git rm --cached <file_path>

Alternatives:

git rm --cached -r <directory_path>

Before deleting untracked files/directory, do a dry run to get the list of these files/directories

git clean -n

Forcefully remove untracked files

git clean -f

Forcefully remove untracked directory

git clean -f -d

Update all the submodules

git submodule foreach git pull

Alternatives:

git submodule update --init --recursive
git submodule update --remote

Show all commits in the current branch yet to be merged to master

git cherry -v master

Alternatives:

git cherry -v master <branch-to-be-merged>

Rename a branch

git branch -m <new-branch-name>

Alternatives:

git branch -m [<old-branch-name>] <new-branch-name>

Rebases 'feature' to 'master' and merges it in to master

git rebase master feature && git checkout master && git merge -

Archive the master branch

git archive master --format=zip --output=master.zip

Modify previous commit without modifying the commit message

git add --all && git commit --amend --no-edit

Prunes references to remove branches that have been deleted in the remote.

git fetch -p

Alternatives:

git remote prune origin

Delete local branches that has been squash and merged in the remote.

git branch -vv | grep ': gone]' | awk '{print <!-- @doxie.inject start -->}' | xargs git branch -D

Retrieve the commit hash of the initial revision.

 git rev-list --reverse HEAD | head -1

Alternatives:

git rev-list --max-parents=0 HEAD
git log --pretty=oneline | tail -1 | cut -c 1-40
git log --pretty=oneline --reverse | head -1 | cut -c 1-40

Visualize the version tree.

git log --pretty=oneline --graph --decorate --all

Alternatives:

gitk --all
git log --graph --pretty=format:'%C(auto) %h | %s | %an | %ar%d'

Visualize the tree including commits that are only referenced from reflogs

git log --graph --decorate --oneline $(git rev-list --walk-reflogs --all)

Deploying git tracked subfolder to gh-pages

git subtree push --prefix subfolder_name origin gh-pages

Adding a project to repo using subtree

git subtree add --prefix=<directory_name>/<project_name> --squash [email protected]:<username>/<project_name>.git master

Get latest changes in your repo for a linked project using subtree

git subtree pull --prefix=<directory_name>/<project_name> --squash [email protected]:<username>/<project_name>.git master

Export a branch with history to a file.

git bundle create <file> <branch-name>

Import from a bundle

git clone repo.bundle <repo-dir> -b <branch-name>

Get the name of current branch.

git rev-parse --abbrev-ref HEAD

Ignore one file on commit (e.g. Changelog).

git update-index --assume-unchanged Changelog; git commit -a; git update-index --no-assume-unchanged Changelog

Stash changes before rebasing

git rebase --autostash

Fetch pull request by ID to a local branch

git fetch origin pull/<id>/head:<branch-name>

Alternatives:

git pull origin pull/<id>/head:<branch-name>

Show the most recent tag on the current branch.

git describe --tags --abbrev=0

Show inline word diff.

git diff --word-diff

Show changes using common diff tools.

git difftool [-t <tool>] <commit1> <commit2> <path>

Don’t consider changes for tracked file.

git update-index --assume-unchanged <file_name>

Undo assume-unchanged.

git update-index --no-assume-unchanged <file_name>

Clean the files from .gitignore.

git clean -X -f

Restore deleted file.

git checkout <deleting_commit> -- <file_path>

Restore file to a specific commit-hash

git checkout <commit-ish> -- <file_path>

Always rebase instead of merge on pull.

git config --global pull.rebase true

Alternatives:

#git < 1.7.9
git config --global branch.autosetuprebase always

List all the alias and configs.

git config --list

Make git case sensitive.

git config --global core.ignorecase false

Add custom editors.

git config --global core.editor '$EDITOR'

Auto correct typos.

git config --global help.autocorrect 1

Check if the change was a part of a release.

git name-rev --name-only <SHA-1>

Dry run. (any command that supports dry-run flag should do.)

git clean -fd --dry-run

Marks your commit as a fix of a previous commit.

git commit --fixup <SHA-1>

Squash fixup commits normal commits.

git rebase -i --autosquash

Skip staging area during commit.

git commit --only <file_path>

Interactive staging.

git add -i

List ignored files.

git check-ignore *

Status of ignored files.

git status --ignored

Commits in Branch1 that are not in Branch2

git log Branch1 ^Branch2

List n last commits

git log -<n>

Alternatives:

git log -n <n>

Reuse recorded resolution, record and reuse previous conflicts resolutions.

git config --global rerere.enabled 1

Open all conflicted files in an editor.

git diff --name-only | uniq | xargs $EDITOR

Count unpacked number of objects and their disk consumption.

git count-objects --human-readable

Prune all unreachable objects from the object database.

git gc --prune=now --aggressive

Instantly browse your working repository in gitweb.

git instaweb [--local] [--httpd=<httpd>] [--port=<port>] [--browser=<browser>]

View the GPG signatures in the commit log

git log --show-signature

Remove entry in the global config.

git config --global --unset <entry-name>

Checkout a new branch without any history

git checkout --orphan <branch_name>

Extract file from another branch.

git show <branch_name>:<file_name>

List only the root and merge commits.

git log --first-parent

Change previous two commits with an interactive rebase.

git rebase --interactive HEAD~2

List all branch is WIP

git checkout master && git branch --no-merged

Find guilty with binary search

git bisect start                    # Search start 
git bisect bad                      # Set point to bad commit 
git bisect good v2.6.13-rc2         # Set point to good commit|tag 
git bisect bad                      # Say current state is bad 
git bisect good                     # Say current state is good 
git bisect reset                    # Finish search 

Bypass pre-commit and commit-msg githooks

git commit --no-verify

List commits and changes to a specific file (even through renaming)

git log --follow -p -- <file_path>

Clone a single branch

git clone -b <branch-name> --single-branch https://github.com/user/repo.git

Create and switch new branch

git checkout -b <branch-name>

Alternatives:

git branch <branch-name> && git checkout <branch-name>
git switch -c <branch-name>

Ignore file mode changes on commits

git config core.fileMode false

Turn off git colored terminal output

git config --global color.ui false

Specific color settings

git config --global <specific command e.g branch, diff> <true, false or always>

Show all local branches ordered by recent commits

git for-each-ref --sort=-committerdate --format='%(refname:short)' refs/heads/

Find lines matching the pattern (regex or string) in tracked files

git grep --heading --line-number 'foo bar'

Clone a shallow copy of a repository

git clone https://github.com/user/repo.git --depth 1

Search Commit log across all branches for given text

git log --all --grep='<given-text>'

Get first commit in a branch (from master)

git log --oneline master..<branch-name> | tail -1

Alternatives:

git log --reverse master..<branch-name> | head -6

Unstaging Staged file

git reset HEAD <file-name>

Force push to Remote Repository

git push -f <remote-name> <branch-name>

Adding Remote name

git remote add <remote-nickname> <remote-url>

List all currently configured remotes

git remote -v

Show the author, time and last revision made to each line of a given file

git blame <file-name>

Group commits by authors and title

git shortlog

Forced push but still ensure you don't overwrite other's work

git push --force-with-lease <remote-name> <branch-name>

Show how many lines does an author contribute

git log --author='_Your_Name_Here_' --pretty=tformat: --numstat | gawk '{ add += <!-- @doxie.inject start -->; subs += <!-- @doxie.inject end -->; loc += <!-- @doxie.inject start --> - <!-- @doxie.inject end --> } END { printf "added lines: %s removed lines: %s total lines: %s
", add, subs, loc }' -

Alternatives:

git log --author='_Your_Name_Here_' --pretty=tformat: --numstat | awk '{ add += <!-- @doxie.inject start -->; subs += <!-- @doxie.inject end -->; loc += <!-- @doxie.inject start --> - <!-- @doxie.inject end --> } END { printf "added lines: %s, removed lines: %s, total lines: %s
", add, subs, loc }' - # on Mac OSX

Revert: Reverting an entire merge

git revert -m 1 <commit-ish>

Number of commits in a branch

git rev-list --count <branch-name>

Alias: git undo

git config --global alias.undo '!f() { git reset --hard $(git rev-parse --abbrev-ref HEAD)@{${1-1}}; }; f'

Add object notes

git notes add -m 'Note on the previous commit....'

Show all the git-notes

git log --show-notes='*'

Apply commit from another repository

git --git-dir=<source-dir>/.git format-patch -k -1 --stdout <SHA1> | git am -3 -k

Specific fetch reference

git fetch origin master:refs/remotes/origin/mymaster

Find common ancestor of two branches

git merge-base <branch-name> <other-branch-name>

List unpushed git commits

git log --branches --not --remotes

Alternatives:

git log @{u}..
git cherry -v

Add everything, but whitespace changes

git diff --ignore-all-space | git apply --cached

Edit [local/global] git config

git config [--global] --edit

blame on certain range

git blame -L <start>,<end>

Show a Git logical variable.

git var -l | <variable>

Preformatted patch file.

git format-patch -M upstream..topic

Get the repo name.

git rev-parse --show-toplevel

logs between date range

git log --since='FEB 1 2017' --until='FEB 14 2017'

Exclude author from logs

git log --perl-regexp --author='^((?!excluded-author-regex).*)

Generates a summary of pending changes

git request-pull v1.0 https://git.ko.xz/project master:for-linus

List references in a remote repository

git ls-remote git://git.kernel.org/pub/scm/git/git.git

Backup untracked files.

git ls-files --others -i --exclude-standard | xargs zip untracked.zip

List all git aliases

git config -l | grep alias | sed 's/^alias\.//g'

Alternatives:

git config -l | grep alias | cut -d '.' -f 2

Show git status short

git status --short --branch

Checkout a commit prior to a day ago

git checkout master@{yesterday}

Push the current branch to the same name on the remote repository

git push origin HEAD

Push a new local branch to remote repository and track

git push -u origin <branch_name>

Change a branch base

git rebase --onto <new_base> <old_base>

Use SSH instead of HTTPs for remotes

git config --global url.'[email protected]:'.insteadOf 'https://github.com/'

Update a submodule to the latest commit

cd <path-to-submodule>
git pull origin <branch>
cd <root-of-your-main-project>
git add <path-to-submodule>
git commit -m "submodule updated"

Prevent auto replacing LF with CRLF

git config --global core.autocrlf false

git-tips/tips

{
"props": {
"initialPayload": {
"allShortcutsEnabled": false,
"path": "/",
"repo": {
"id": 39122628,
"defaultBranch": "master",
"name": "tips",
"ownerLogin": "git-tips",
"currentUserCanPush": false,
"isFork": false,
"isEmpty": false,
"createdAt": "2015-07-15T07:24:48.000Z",
"ownerAvatar": "https://avatars.githubusercontent.com/u/13345927?v=4",
"public": true,
"private": false,
"isOrgOwned": true
},
"currentUser": null,
"refInfo": {
"name": "master",
"listCacheKey": "v0:1588103318.0",
"canEdit": false,
"refType": "branch",
"currentOid": "1c23d34fbb90df79201432019c5b04dda58e76c8"
},
"tree": {
"items": [
{
"name": ".vscode",
"path": ".vscode",
"contentType": "directory"
},
{
"name": ".doxie.render.js",
"path": ".doxie.render.js",
"contentType": "file"
},
{
"name": ".doxie.render.toc.js",
"path": ".doxie.render.toc.js",
"contentType": "file"
},
{
"name": ".gitignore",
"path": ".gitignore",
"contentType": "file"
},
{
"name": "CODE_OF_CONDUCT.md",
"path": "CODE_OF_CONDUCT.md",
"contentType": "file"
},
{
"name": "LICENSE",
"path": "LICENSE",
"contentType": "file"
},
{
"name": "README.md",
"path": "README.md",
"contentType": "file"
},
{
"name": "contributing.md",
"path": "contributing.md",
"contentType": "file"
},
{
"name": "package-lock.json",
"path": "package-lock.json",
"contentType": "file"
},
{
"name": "package.json",
"path": "package.json",
"contentType": "file"
},
{
"name": "tips.json",
"path": "tips.json",
"contentType": "file"
}
],
"templateDirectorySuggestionUrl": null,
"readme": null,
"totalCount": 11,
"showBranchInfobar": false
},
"fileTree": null,
"fileTreeProcessingTime": null,
"foldersToFetch": [],
"treeExpanded": false,
"symbolsExpanded": false,
"isOverview": true,
"overview": {
"banners": {
"shouldRecommendReadme": false,
"isPersonalRepo": false,
"showUseActionBanner": false,
"actionSlug": null,
"actionId": null,
"showProtectBranchBanner": false,
"publishBannersInfo": {
"dismissActionNoticePath": "/settings/dismiss-notice/publish_action_from_repo",
"releasePath": "/git-tips/tips/releases/new?marketplace=true",
"showPublishActionBanner": false
},
"interactionLimitBanner": null,
"showInvitationBanner": false,
"inviterName": null
},
"codeButton": {
"contactPath": "/contact",
"isEnterprise": false,
"local": {
"protocolInfo": {
"httpAvailable": true,
"sshAvailable": null,
"httpUrl": "https://github.com/git-tips/tips.git",
"showCloneWarning": null,
"sshUrl": null,
"sshCertificatesRequired": null,
"sshCertificatesAvailable": null,
"ghCliUrl": "gh repo clone git-tips/tips",
"defaultProtocol": "http",
"newSshKeyUrl": "/settings/ssh/new",
"setProtocolPath": "/users/set_protocol"
},
"platformInfo": {
"cloneUrl": "https://desktop.github.com",
"showVisualStudioCloneButton": false,
"visualStudioCloneUrl": "https://windows.github.com",
"showXcodeCloneButton": false,
"xcodeCloneUrl": "https://developer.apple.com",
"zipballUrl": "/git-tips/tips/archive/refs/heads/master.zip"
}
},
"newCodespacePath": "/codespaces/new?hide_repo_select=true&repo=39122628"
},
"popovers": {
"rename": null,
"renamedParentRepo": null
},
"commitCount": "402",
"overviewFiles": [
{
"displayName": "README.md",
"repoName": "tips",
"refName": "master",
"path": "README.md",
"preferredFileType": "readme",
"tabName": "README",
"richText": "<article class=\"markdown-body entry-content container-lg\" itemprop=\"text\"><div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">git-tips</h2><a id=\"user-content-git-tips\" class=\"anchor\" aria-label=\"Permalink: git-tips\" href=\"#git-tips\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<blockquote>\n<p dir=\"auto\">Collection of <code>git-tips</code>, want to add your tips? Checkout <a href=\"/git-tips/tips/blob/master/contributing.md\">contributing.md</a></p>\n</blockquote>\n<p dir=\"auto\"><a href=\"http://git.io/git-tips\" rel=\"nofollow\">English</a> | <a href=\"https://github.com/521xueweihan/git-tips\">中文</a> | <a href=\"https://github.com/Imangazaliev/git-tips\">Русский</a> | <a href=\"https://github.com/mingrammer/git-tips\">한국어</a> | <a href=\"https://github.com/hprobotic/git-tips\">Tiếng Việt</a> | <a href=\"https://github.com/isotai/git-tips\">日本語</a> | <a href=\"https://github.com/amarduwal/git-tips\">नेपाली</a> | <a href=\"https://github.com/mbiesiad/tips\">Polski</a> | <a href=\"https://github.com/javadnikbakht/git-tips\">فارسی</a></p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"><strong>Tools:</strong></h3><a id=\"user-content-tools\" class=\"anchor\" aria-label=\"Permalink: Tools:\" href=\"#tools\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<ul dir=\"auto\">\n<li><a href=\"https://www.npmjs.com/package/git-tip\" rel=\"nofollow\">git-tip</a> - A handy CLI to make optimum use of these tips. (<a href=\"https://github.com/djoudi5/docker-git-tip\">Here in Docker container</a>)</li>\n</ul>\n<p dir=\"auto\">P.S: All these commands are tested on <code>git version 2.7.4 (Apple Git-66)</code>.</p>\n\n\n<ul dir=\"auto\">\n<li><a href=\"#everyday-git-in-twenty-commands-or-so\">Everyday Git in twenty commands or so</a></li>\n<li><a href=\"#show-helpful-guides-that-come-with-git\">Show helpful guides that come with Git</a></li>\n<li><a href=\"#search-change-by-content\">Search change by content</a></li>\n<li><a href=\"#show-changes-over-time-for-specific-file\">Show changes over time for specific file</a></li>\n<li><a href=\"#remove-sensitive-data-from-history-after-a-push\">Remove sensitive data from history, after a push</a></li>\n<li><a href=\"#sync-with-remote-overwrite-local-changes\">Sync with remote, overwrite local changes</a></li>\n<li><a href=\"#list-of-all-files-till-a-commit\">List of all files till a commit</a></li>\n<li><a href=\"#git-reset-first-commit\">Git reset first commit</a></li>\n<li><a href=\"#reset-preserve-uncommitted-local-changes\">Reset: preserve uncommitted local changes</a></li>\n<li><a href=\"#list-all-the-conflicted-files\">List all the conflicted files</a></li>\n<li><a href=\"#list-of-all-files-changed-in-a-commit\">List of all files changed in a commit</a></li>\n<li><a href=\"#unstaged-changes-since-last-commit\">Unstaged changes since last commit</a></li>\n<li><a href=\"#changes-staged-for-commit\">Changes staged for commit</a></li>\n<li><a href=\"#show-both-staged-and-unstaged-changes\">Show both staged and unstaged changes</a></li>\n<li><a href=\"#list-all-branches-that-are-already-merged-into-master\">List all branches that are already merged into master</a></li>\n<li><a href=\"#quickly-switch-to-the-previous-branch\">Quickly switch to the previous branch</a></li>\n<li><a href=\"#remove-branches-that-have-already-been-merged-with-master\">Remove branches that have already been merged with master</a></li>\n<li><a href=\"#list-all-branches-and-their-upstreams-as-well-as-last-commit-on-branch\">List all branches and their upstreams, as well as last commit on branch</a></li>\n<li><a href=\"#track-upstream-branch\">Track upstream branch</a></li>\n<li><a href=\"#delete-local-branch\">Delete local branch</a></li>\n<li><a href=\"#delete-remote-branch\">Delete remote branch</a></li>\n<li><a href=\"#create-local-tag\">Create local tag</a></li>\n<li><a href=\"#delete-local-tag\">Delete local tag</a></li>\n<li><a href=\"#delete-remote-tag\">Delete remote tag</a></li>\n<li><a href=\"#undo-local-changes-with-the-last-content-in-head\">Undo local changes with the last content in head</a></li>\n<li><a href=\"#revert-undo-a-commit-by-creating-a-new-commit\">Revert: Undo a commit by creating a new commit</a></li>\n<li><a href=\"#reset-discard-commits-advised-for-private-branch\">Reset: Discard commits, advised for private branch</a></li>\n<li><a href=\"#reword-the-previous-commit-message\">Reword the previous commit message</a></li>\n<li><a href=\"#see-commit-history-for-just-the-current-branch\">See commit history for just the current branch</a></li>\n<li><a href=\"#amend-author\">Amend author.</a></li>\n<li><a href=\"#reset-author-after-author-has-been-changed-in-the-global-config\">Reset author, after author has been changed in the global config.</a></li>\n<li><a href=\"#changing-a-remotes-url\">Changing a remote's URL</a></li>\n<li><a href=\"#get-list-of-all-remote-references\">Get list of all remote references</a></li>\n<li><a href=\"#get-list-of-all-local-and-remote-branches\">Get list of all local and remote branches</a></li>\n<li><a href=\"#get-only-remote-branches\">Get only remote branches</a></li>\n<li><a href=\"#stage-parts-of-a-changed-file-instead-of-the-entire-file\">Stage parts of a changed file, instead of the entire file</a></li>\n<li><a href=\"#get-git-bash-completion\">Get git bash completion</a></li>\n<li><a href=\"#what-changed-since-two-weeks\">What changed since two weeks?</a></li>\n<li><a href=\"#see-all-commits-made-since-forking-from-master\">See all commits made since forking from master</a></li>\n<li><a href=\"#pick-commits-across-branches-using-cherry-pick\">Pick commits across branches using cherry-pick</a></li>\n<li><a href=\"#find-out-branches-containing-commit-hash\">Find out branches containing commit-hash</a></li>\n<li><a href=\"#git-aliases\">Git Aliases</a></li>\n<li><a href=\"#saving-current-state-of-tracked-files-without-commiting\">Saving current state of tracked files without commiting</a></li>\n<li><a href=\"#saving-current-state-of-unstaged-changes-to-tracked-files\">Saving current state of unstaged changes to tracked files</a></li>\n<li><a href=\"#saving-current-state-including-untracked-files\">Saving current state including untracked files</a></li>\n<li><a href=\"#saving-current-state-with-message\">Saving current state with message</a></li>\n<li><a href=\"#saving-current-state-of-all-files-ignored-untracked-and-tracked\">Saving current state of all files (ignored, untracked, and tracked)</a></li>\n<li><a href=\"#show-list-of-all-saved-stashes\">Show list of all saved stashes</a></li>\n<li><a href=\"#show-the-contents-of-any-stash-in-patch-form\">Show the contents of any stash in patch form</a></li>\n<li><a href=\"#apply-any-stash-without-deleting-from-the-stashed-list\">Apply any stash without deleting from the stashed list</a></li>\n<li><a href=\"#apply-last-stashed-state-and-delete-it-from-stashed-list\">Apply last stashed state and delete it from stashed list</a></li>\n<li><a href=\"#delete-all-stored-stashes\">Delete all stored stashes</a></li>\n<li><a href=\"#grab-a-single-file-from-a-stash\">Grab a single file from a stash</a></li>\n<li><a href=\"#show-all-tracked-files\">Show all tracked files</a></li>\n<li><a href=\"#show-all-untracked-files\">Show all untracked files</a></li>\n<li><a href=\"#show-all-ignored-files\">Show all ignored files</a></li>\n<li><a href=\"#create-new-working-tree-from-a-repository-git-25\">Create new working tree from a repository (git 2.5)</a></li>\n<li><a href=\"#create-new-working-tree-from-head-state\">Create new working tree from HEAD state</a></li>\n<li><a href=\"#untrack-files-without-deleting\">Untrack files without deleting</a></li>\n<li><a href=\"#before-deleting-untracked-filesdirectory-do-a-dry-run-to-get-the-list-of-these-filesdirectories\">Before deleting untracked files/directory, do a dry run to get the list of these files/directories</a></li>\n<li><a href=\"#forcefully-remove-untracked-files\">Forcefully remove untracked files</a></li>\n<li><a href=\"#forcefully-remove-untracked-directory\">Forcefully remove untracked directory</a></li>\n<li><a href=\"#update-all-the-submodules\">Update all the submodules</a></li>\n<li><a href=\"#show-all-commits-in-the-current-branch-yet-to-be-merged-to-master\">Show all commits in the current branch yet to be merged to master</a></li>\n<li><a href=\"#rename-a-branch\">Rename a branch</a></li>\n<li><a href=\"#rebases-feature-to-master-and-merges-it-in-to-master\">Rebases 'feature' to 'master' and merges it in to master </a></li>\n<li><a href=\"#archive-the-master-branch\">Archive the <code>master</code> branch</a></li>\n<li><a href=\"#modify-previous-commit-without-modifying-the-commit-message\">Modify previous commit without modifying the commit message</a></li>\n<li><a href=\"#prunes-references-to-remove-branches-that-have-been-deleted-in-the-remote\">Prunes references to remove branches that have been deleted in the remote.</a></li>\n<li><a href=\"#delete-local-branches-that-has-been-squash-and-merged-in-the-remote\">Delete local branches that has been squash and merged in the remote.</a></li>\n<li><a href=\"#retrieve-the-commit-hash-of-the-initial-revision\">Retrieve the commit hash of the initial revision.</a></li>\n<li><a href=\"#visualize-the-version-tree\">Visualize the version tree.</a></li>\n<li><a href=\"#visualize-the-tree-including-commits-that-are-only-referenced-from-reflogs\">Visualize the tree including commits that are only referenced from reflogs</a></li>\n<li><a href=\"#deploying-git-tracked-subfolder-to-gh-pages\">Deploying git tracked subfolder to gh-pages</a></li>\n<li><a href=\"#adding-a-project-to-repo-using-subtree\">Adding a project to repo using subtree</a></li>\n<li><a href=\"#get-latest-changes-in-your-repo-for-a-linked-project-using-subtree\">Get latest changes in your repo for a linked project using subtree</a></li>\n<li><a href=\"#export-a-branch-with-history-to-a-file\">Export a branch with history to a file.</a></li>\n<li><a href=\"#import-from-a-bundle\">Import from a bundle</a></li>\n<li><a href=\"#get-the-name-of-current-branch\">Get the name of current branch.</a></li>\n<li><a href=\"#ignore-one-file-on-commit-eg-changelog\">Ignore one file on commit (e.g. Changelog).</a></li>\n<li><a href=\"#stash-changes-before-rebasing\">Stash changes before rebasing</a></li>\n<li><a href=\"#fetch-pull-request-by-id-to-a-local-branch\">Fetch pull request by ID to a local branch</a></li>\n<li><a href=\"#show-the-most-recent-tag-on-the-current-branch\">Show the most recent tag on the current branch.</a></li>\n<li><a href=\"#show-inline-word-diff\">Show inline word diff.</a></li>\n<li><a href=\"#show-changes-using-common-diff-tools\">Show changes using common diff tools.</a></li>\n<li><a href=\"#dont-consider-changes-for-tracked-file\">Don’t consider changes for tracked file.</a></li>\n<li><a href=\"#undo-assume-unchanged\">Undo assume-unchanged.</a></li>\n<li><a href=\"#clean-the-files-from-gitignore\">Clean the files from <code>.gitignore</code>.</a></li>\n<li><a href=\"#restore-deleted-file\">Restore deleted file.</a></li>\n<li><a href=\"#restore-file-to-a-specific-commit-hash\">Restore file to a specific commit-hash</a></li>\n<li><a href=\"#always-rebase-instead-of-merge-on-pull\">Always rebase instead of merge on pull.</a></li>\n<li><a href=\"#list-all-the-alias-and-configs\">List all the alias and configs.</a></li>\n<li><a href=\"#make-git-case-sensitive\">Make git case sensitive.</a></li>\n<li><a href=\"#add-custom-editors\">Add custom editors.</a></li>\n<li><a href=\"#auto-correct-typos\">Auto correct typos.</a></li>\n<li><a href=\"#check-if-the-change-was-a-part-of-a-release\">Check if the change was a part of a release.</a></li>\n<li><a href=\"#dry-run-any-command-that-supports-dry-run-flag-should-do\">Dry run. (any command that supports dry-run flag should do.)</a></li>\n<li><a href=\"#marks-your-commit-as-a-fix-of-a-previous-commit\">Marks your commit as a fix of a previous commit.</a></li>\n<li><a href=\"#squash-fixup-commits-normal-commits\">Squash fixup commits normal commits.</a></li>\n<li><a href=\"#skip-staging-area-during-commit\">Skip staging area during commit.</a></li>\n<li><a href=\"#interactive-staging\">Interactive staging.</a></li>\n<li><a href=\"#list-ignored-files\">List ignored files.</a></li>\n<li><a href=\"#status-of-ignored-files\">Status of ignored files.</a></li>\n<li><a href=\"#commits-in-branch1-that-are-not-in-branch2\">Commits in Branch1 that are not in Branch2</a></li>\n<li><a href=\"#list-n-last-commits\">List n last commits</a></li>\n<li><a href=\"#reuse-recorded-resolution-record-and-reuse-previous-conflicts-resolutions\">Reuse recorded resolution, record and reuse previous conflicts resolutions.</a></li>\n<li><a href=\"#open-all-conflicted-files-in-an-editor\">Open all conflicted files in an editor.</a></li>\n<li><a href=\"#count-unpacked-number-of-objects-and-their-disk-consumption\">Count unpacked number of objects and their disk consumption.</a></li>\n<li><a href=\"#prune-all-unreachable-objects-from-the-object-database\">Prune all unreachable objects from the object database.</a></li>\n<li><a href=\"#instantly-browse-your-working-repository-in-gitweb\">Instantly browse your working repository in gitweb.</a></li>\n<li><a href=\"#view-the-gpg-signatures-in-the-commit-log\">View the GPG signatures in the commit log</a></li>\n<li><a href=\"#remove-entry-in-the-global-config\">Remove entry in the global config.</a></li>\n<li><a href=\"#checkout-a-new-branch-without-any-history\">Checkout a new branch without any history</a></li>\n<li><a href=\"#extract-file-from-another-branch\">Extract file from another branch.</a></li>\n<li><a href=\"#list-only-the-root-and-merge-commits\">List only the root and merge commits.</a></li>\n<li><a href=\"#change-previous-two-commits-with-an-interactive-rebase\">Change previous two commits with an interactive rebase.</a></li>\n<li><a href=\"#list-all-branch-is-wip\">List all branch is WIP</a></li>\n<li><a href=\"#find-guilty-with-binary-search\">Find guilty with binary search</a></li>\n<li><a href=\"#bypass-pre-commit-and-commit-msg-githooks\">Bypass pre-commit and commit-msg githooks</a></li>\n<li><a href=\"#list-commits-and-changes-to-a-specific-file-even-through-renaming\">List commits and changes to a specific file (even through renaming)</a></li>\n<li><a href=\"#clone-a-single-branch\">Clone a single branch</a></li>\n<li><a href=\"#create-and-switch-new-branch\">Create and switch new branch</a></li>\n<li><a href=\"#ignore-file-mode-changes-on-commits\">Ignore file mode changes on commits</a></li>\n<li><a href=\"#turn-off-git-colored-terminal-output\">Turn off git colored terminal output</a></li>\n<li><a href=\"#specific-color-settings\">Specific color settings</a></li>\n<li><a href=\"#show-all-local-branches-ordered-by-recent-commits\">Show all local branches ordered by recent commits</a></li>\n<li><a href=\"#find-lines-matching-the-pattern-regex-or-string-in-tracked-files\">Find lines matching the pattern (regex or string) in tracked files</a></li>\n<li><a href=\"#clone-a-shallow-copy-of-a-repository\">Clone a shallow copy of a repository</a></li>\n<li><a href=\"#search-commit-log-across-all-branches-for-given-text\">Search Commit log across all branches for given text</a></li>\n<li><a href=\"#get-first-commit-in-a-branch-from-master\">Get first commit in a branch (from master)</a></li>\n<li><a href=\"#unstaging-staged-file\">Unstaging Staged file</a></li>\n<li><a href=\"#force-push-to-remote-repository\">Force push to Remote Repository</a></li>\n<li><a href=\"#adding-remote-name\">Adding Remote name</a></li>\n<li><a href=\"#list-all-currently-configured-remotes\">List all currently configured remotes</a></li>\n<li><a href=\"#show-the-author-time-and-last-revision-made-to-each-line-of-a-given-file\">Show the author, time and last revision made to each line of a given file</a></li>\n<li><a href=\"#group-commits-by-authors-and-title\">Group commits by authors and title</a></li>\n<li><a href=\"#forced-push-but-still-ensure-you-dont-overwrite-others-work\">Forced push but still ensure you don't overwrite other's work</a></li>\n<li><a href=\"#show-how-many-lines-does-an-author-contribute\">Show how many lines does an author contribute</a></li>\n<li><a href=\"#revert-reverting-an-entire-merge\">Revert: Reverting an entire merge</a></li>\n<li><a href=\"#number-of-commits-in-a-branch\">Number of commits in a branch</a></li>\n<li><a href=\"#alias-git-undo\">Alias: git undo</a></li>\n<li><a href=\"#add-object-notes\">Add object notes</a></li>\n<li><a href=\"#show-all-the-git-notes\">Show all the git-notes</a></li>\n<li><a href=\"#apply-commit-from-another-repository\">Apply commit from another repository</a></li>\n<li><a href=\"#specific-fetch-reference\">Specific fetch reference</a></li>\n<li><a href=\"#find-common-ancestor-of-two-branches\">Find common ancestor of two branches</a></li>\n<li><a href=\"#list-unpushed-git-commits\">List unpushed git commits</a></li>\n<li><a href=\"#add-everything-but-whitespace-changes\">Add everything, but whitespace changes</a></li>\n<li><a href=\"#edit-localglobal-git-config\">Edit [local/global] git config</a></li>\n<li><a href=\"#blame-on-certain-range\">blame on certain range</a></li>\n<li><a href=\"#show-a-git-logical-variable\">Show a Git logical variable.</a></li>\n<li><a href=\"#preformatted-patch-file\">Preformatted patch file.</a></li>\n<li><a href=\"#get-the-repo-name\">Get the repo name.</a></li>\n<li><a href=\"#logs-between-date-range\">logs between date range</a></li>\n<li><a href=\"#exclude-author-from-logs\">Exclude author from logs</a></li>\n<li><a href=\"#generates-a-summary-of-pending-changes\">Generates a summary of pending changes</a></li>\n<li><a href=\"#list-references-in-a-remote-repository\">List references in a remote repository</a></li>\n<li><a href=\"#backup-untracked-files\">Backup untracked files.</a></li>\n<li><a href=\"#list-all-git-aliases\">List all git aliases</a></li>\n<li><a href=\"#show-git-status-short\">Show git status short</a></li>\n<li><a href=\"#checkout-a-commit-prior-to-a-day-ago\">Checkout a commit prior to a day ago</a></li>\n<li><a href=\"#push-the-current-branch-to-the-same-name-on-the-remote-repository\">Push the current branch to the same name on the remote repository</a></li>\n<li><a href=\"#push-a-new-local-branch-to-remote-repository-and-track\">Push a new local branch to remote repository and track</a></li>\n<li><a href=\"#change-a-branch-base\">Change a branch base</a></li>\n<li><a href=\"#use-ssh-instead-of-https-for-remotes\">Use SSH instead of HTTPs for remotes</a></li>\n<li><a href=\"#update-a-submodule-to-the-latest-commit\">Update a submodule to the latest commit</a></li>\n<li><a href=\"#prevent-auto-replacing-lf-with-crlf\">Prevent auto replacing LF with CRLF</a></li>\n</ul>\n\n\n\n\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Everyday Git in twenty commands or so</h2><a id=\"user-content-everyday-git-in-twenty-commands-or-so\" class=\"anchor\" aria-label=\"Permalink: Everyday Git in twenty commands or so\" href=\"#everyday-git-in-twenty-commands-or-so\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git help everyday\"><pre>git <span class=\"pl-c1\">help</span> everyday</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Show helpful guides that come with Git</h2><a id=\"user-content-show-helpful-guides-that-come-with-git\" class=\"anchor\" aria-label=\"Permalink: Show helpful guides that come with Git\" href=\"#show-helpful-guides-that-come-with-git\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git help -g\"><pre>git <span class=\"pl-c1\">help</span> -g</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Search change by content</h2><a id=\"user-content-search-change-by-content\" class=\"anchor\" aria-label=\"Permalink: Search change by content\" href=\"#search-change-by-content\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git log -S'&lt;a term in the source&gt;'\"><pre>git log -S<span class=\"pl-s\"><span class=\"pl-pds\">'</span>&lt;a term in the source&gt;<span class=\"pl-pds\">'</span></span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Show changes over time for specific file</h2><a id=\"user-content-show-changes-over-time-for-specific-file\" class=\"anchor\" aria-label=\"Permalink: Show changes over time for specific file\" href=\"#show-changes-over-time-for-specific-file\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git log -p &lt;file_name&gt;\"><pre>git log -p <span class=\"pl-k\">&lt;</span>file_name<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Remove sensitive data from history, after a push</h2><a id=\"user-content-remove-sensitive-data-from-history-after-a-push\" class=\"anchor\" aria-label=\"Permalink: Remove sensitive data from history, after a push\" href=\"#remove-sensitive-data-from-history-after-a-push\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch &lt;path-to-your-file&gt;' --prune-empty --tag-name-filter cat -- --all &amp;&amp; git push origin --force --all\"><pre>git filter-branch --force --index-filter <span class=\"pl-s\"><span class=\"pl-pds\">'</span>git rm --cached --ignore-unmatch &lt;path-to-your-file&gt;<span class=\"pl-pds\">'</span></span> --prune-empty --tag-name-filter cat -- --all <span class=\"pl-k\">&amp;&amp;</span> git push origin --force --all</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Sync with remote, overwrite local changes</h2><a id=\"user-content-sync-with-remote-overwrite-local-changes\" class=\"anchor\" aria-label=\"Permalink: Sync with remote, overwrite local changes\" href=\"#sync-with-remote-overwrite-local-changes\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git fetch origin &amp;&amp; git reset --hard origin/master &amp;&amp; git clean -f -d\"><pre>git fetch origin <span class=\"pl-k\">&amp;&amp;</span> git reset --hard origin/master <span class=\"pl-k\">&amp;&amp;</span> git clean -f -d</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">List of all files till a commit</h2><a id=\"user-content-list-of-all-files-till-a-commit\" class=\"anchor\" aria-label=\"Permalink: List of all files till a commit\" href=\"#list-of-all-files-till-a-commit\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git ls-tree --name-only -r &lt;commit-ish&gt;\"><pre>git ls-tree --name-only -r <span class=\"pl-k\">&lt;</span>commit-ish<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Git reset first commit</h2><a id=\"user-content-git-reset-first-commit\" class=\"anchor\" aria-label=\"Permalink: Git reset first commit\" href=\"#git-reset-first-commit\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git update-ref -d HEAD\"><pre>git update-ref -d HEAD</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Reset: preserve uncommitted local changes</h2><a id=\"user-content-reset-preserve-uncommitted-local-changes\" class=\"anchor\" aria-label=\"Permalink: Reset: preserve uncommitted local changes\" href=\"#reset-preserve-uncommitted-local-changes\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git reset --keep &lt;commit&gt;\"><pre>git reset --keep <span class=\"pl-k\">&lt;</span>commit<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">List all the conflicted files</h2><a id=\"user-content-list-all-the-conflicted-files\" class=\"anchor\" aria-label=\"Permalink: List all the conflicted files\" href=\"#list-all-the-conflicted-files\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git diff --name-only --diff-filter=U\"><pre>git diff --name-only --diff-filter=U</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">List of all files changed in a commit</h2><a id=\"user-content-list-of-all-files-changed-in-a-commit\" class=\"anchor\" aria-label=\"Permalink: List of all files changed in a commit\" href=\"#list-of-all-files-changed-in-a-commit\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git diff-tree --no-commit-id --name-only -r &lt;commit-ish&gt;\"><pre>git diff-tree --no-commit-id --name-only -r <span class=\"pl-k\">&lt;</span>commit-ish<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Unstaged changes since last commit</h2><a id=\"user-content-unstaged-changes-since-last-commit\" class=\"anchor\" aria-label=\"Permalink: Unstaged changes since last commit\" href=\"#unstaged-changes-since-last-commit\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git diff\"><pre>git diff</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Changes staged for commit</h2><a id=\"user-content-changes-staged-for-commit\" class=\"anchor\" aria-label=\"Permalink: Changes staged for commit\" href=\"#changes-staged-for-commit\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git diff --cached\"><pre>git diff --cached</pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git diff --staged\"><pre>git diff --staged</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Show both staged and unstaged changes</h2><a id=\"user-content-show-both-staged-and-unstaged-changes\" class=\"anchor\" aria-label=\"Permalink: Show both staged and unstaged changes\" href=\"#show-both-staged-and-unstaged-changes\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git diff HEAD\"><pre>git diff HEAD</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">List all branches that are already merged into master</h2><a id=\"user-content-list-all-branches-that-are-already-merged-into-master\" class=\"anchor\" aria-label=\"Permalink: List all branches that are already merged into master\" href=\"#list-all-branches-that-are-already-merged-into-master\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git branch --merged master\"><pre>git branch --merged master</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Quickly switch to the previous branch</h2><a id=\"user-content-quickly-switch-to-the-previous-branch\" class=\"anchor\" aria-label=\"Permalink: Quickly switch to the previous branch\" href=\"#quickly-switch-to-the-previous-branch\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git checkout -\"><pre>git checkout -</pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git checkout @{-1}\"><pre>git checkout @{-1}</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Remove branches that have already been merged with master</h2><a id=\"user-content-remove-branches-that-have-already-been-merged-with-master\" class=\"anchor\" aria-label=\"Permalink: Remove branches that have already been merged with master\" href=\"#remove-branches-that-have-already-been-merged-with-master\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git branch --merged master | grep -v '^\\*' | xargs -n 1 git branch -d\"><pre>git branch --merged master <span class=\"pl-k\">|</span> grep -v <span class=\"pl-s\"><span class=\"pl-pds\">'</span>^\\*<span class=\"pl-pds\">'</span></span> <span class=\"pl-k\">|</span> xargs -n 1 git branch -d</pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git branch --merged master | grep -v '^\\*\\| master' | xargs -n 1 git branch -d # will not delete master if master is not checked out\"><pre>git branch --merged master <span class=\"pl-k\">|</span> grep -v <span class=\"pl-s\"><span class=\"pl-pds\">'</span>^\\*\\| master<span class=\"pl-pds\">'</span></span> <span class=\"pl-k\">|</span> xargs -n 1 git branch -d <span class=\"pl-c\"><span class=\"pl-c\">#</span> will not delete master if master is not checked out</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">List all branches and their upstreams, as well as last commit on branch</h2><a id=\"user-content-list-all-branches-and-their-upstreams-as-well-as-last-commit-on-branch\" class=\"anchor\" aria-label=\"Permalink: List all branches and their upstreams, as well as last commit on branch\" href=\"#list-all-branches-and-their-upstreams-as-well-as-last-commit-on-branch\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git branch -vv\"><pre>git branch -vv</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Track upstream branch</h2><a id=\"user-content-track-upstream-branch\" class=\"anchor\" aria-label=\"Permalink: Track upstream branch\" href=\"#track-upstream-branch\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git branch -u origin/mybranch\"><pre>git branch -u origin/mybranch</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Delete local branch</h2><a id=\"user-content-delete-local-branch\" class=\"anchor\" aria-label=\"Permalink: Delete local branch\" href=\"#delete-local-branch\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git branch -d &lt;local_branchname&gt;\"><pre>git branch -d <span class=\"pl-k\">&lt;</span>local_branchname<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Delete remote branch</h2><a id=\"user-content-delete-remote-branch\" class=\"anchor\" aria-label=\"Permalink: Delete remote branch\" href=\"#delete-remote-branch\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git push origin --delete &lt;remote_branchname&gt;\"><pre>git push origin --delete <span class=\"pl-k\">&lt;</span>remote_branchname<span class=\"pl-k\">&gt;</span></pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git push origin :&lt;remote_branchname&gt;\"><pre>git push origin :<span class=\"pl-k\">&lt;</span>remote_branchname<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git branch -dr &lt;remote/branch&gt;\"><pre>git branch -dr <span class=\"pl-k\">&lt;</span>remote/branch<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Create local tag</h2><a id=\"user-content-create-local-tag\" class=\"anchor\" aria-label=\"Permalink: Create local tag\" href=\"#create-local-tag\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git tag &lt;tag-name&gt;\"><pre>git tag <span class=\"pl-k\">&lt;</span>tag-name<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Delete local tag</h2><a id=\"user-content-delete-local-tag\" class=\"anchor\" aria-label=\"Permalink: Delete local tag\" href=\"#delete-local-tag\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git tag -d &lt;tag-name&gt;\"><pre>git tag -d <span class=\"pl-k\">&lt;</span>tag-name<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Delete remote tag</h2><a id=\"user-content-delete-remote-tag\" class=\"anchor\" aria-label=\"Permalink: Delete remote tag\" href=\"#delete-remote-tag\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git push origin :refs/tags/&lt;tag-name&gt;\"><pre>git push origin :refs/tags/<span class=\"pl-k\">&lt;</span>tag-name<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Undo local changes with the content in index(staging)</h2><a id=\"user-content-undo-local-changes-with-the-content-in-indexstaging\" class=\"anchor\" aria-label=\"Permalink: Undo local changes with the content in index(staging)\" href=\"#undo-local-changes-with-the-content-in-indexstaging\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git checkout -- &lt;file_name&gt;\"><pre>git checkout -- <span class=\"pl-k\">&lt;</span>file_name<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Revert: Undo a commit by creating a new commit</h2><a id=\"user-content-revert-undo-a-commit-by-creating-a-new-commit\" class=\"anchor\" aria-label=\"Permalink: Revert: Undo a commit by creating a new commit\" href=\"#revert-undo-a-commit-by-creating-a-new-commit\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git revert &lt;commit-ish&gt;\"><pre>git revert <span class=\"pl-k\">&lt;</span>commit-ish<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Reset: Discard commits, advised for private branch</h2><a id=\"user-content-reset-discard-commits-advised-for-private-branch\" class=\"anchor\" aria-label=\"Permalink: Reset: Discard commits, advised for private branch\" href=\"#reset-discard-commits-advised-for-private-branch\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git reset &lt;commit-ish&gt;\"><pre>git reset <span class=\"pl-k\">&lt;</span>commit-ish<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Reword the previous commit message</h2><a id=\"user-content-reword-the-previous-commit-message\" class=\"anchor\" aria-label=\"Permalink: Reword the previous commit message\" href=\"#reword-the-previous-commit-message\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git commit -v --amend\"><pre>git commit -v --amend</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">See commit history for just the current branch</h2><a id=\"user-content-see-commit-history-for-just-the-current-branch\" class=\"anchor\" aria-label=\"Permalink: See commit history for just the current branch\" href=\"#see-commit-history-for-just-the-current-branch\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git cherry -v master\"><pre>git cherry -v master</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Amend author.</h2><a id=\"user-content-amend-author\" class=\"anchor\" aria-label=\"Permalink: Amend author.\" href=\"#amend-author\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git commit --amend --author='Author Name &lt;[email protected]&gt;'\"><pre>git commit --amend --author=<span class=\"pl-s\"><span class=\"pl-pds\">'</span>Author Name &lt;[email protected]&gt;<span class=\"pl-pds\">'</span></span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Reset author, after author has been changed in the global config.</h2><a id=\"user-content-reset-author-after-author-has-been-changed-in-the-global-config\" class=\"anchor\" aria-label=\"Permalink: Reset author, after author has been changed in the global config.\" href=\"#reset-author-after-author-has-been-changed-in-the-global-config\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git commit --amend --reset-author --no-edit\"><pre>git commit --amend --reset-author --no-edit</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Changing a remote's URL</h2><a id=\"user-content-changing-a-remotes-url\" class=\"anchor\" aria-label=\"Permalink: Changing a remote's URL\" href=\"#changing-a-remotes-url\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git remote set-url origin &lt;URL&gt;\"><pre>git remote set-url origin <span class=\"pl-k\">&lt;</span>URL<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Get list of all remote references</h2><a id=\"user-content-get-list-of-all-remote-references\" class=\"anchor\" aria-label=\"Permalink: Get list of all remote references\" href=\"#get-list-of-all-remote-references\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git remote\"><pre>git remote</pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git remote show\"><pre>git remote show</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Get list of all local and remote branches</h2><a id=\"user-content-get-list-of-all-local-and-remote-branches\" class=\"anchor\" aria-label=\"Permalink: Get list of all local and remote branches\" href=\"#get-list-of-all-local-and-remote-branches\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git branch -a\"><pre>git branch -a</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Get only remote branches</h2><a id=\"user-content-get-only-remote-branches\" class=\"anchor\" aria-label=\"Permalink: Get only remote branches\" href=\"#get-only-remote-branches\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git branch -r\"><pre>git branch -r</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Stage parts of a changed file, instead of the entire file</h2><a id=\"user-content-stage-parts-of-a-changed-file-instead-of-the-entire-file\" class=\"anchor\" aria-label=\"Permalink: Stage parts of a changed file, instead of the entire file\" href=\"#stage-parts-of-a-changed-file-instead-of-the-entire-file\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git add -p\"><pre>git add -p</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Get git bash completion</h2><a id=\"user-content-get-git-bash-completion\" class=\"anchor\" aria-label=\"Permalink: Get git bash completion\" href=\"#get-git-bash-completion\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"curl -L http://git.io/vfhol &gt; ~/.git-completion.bash &amp;&amp; echo '[ -f ~/.git-completion.bash ] &amp;&amp; . ~/.git-completion.bash' &gt;&gt; ~/.bashrc\"><pre>curl -L http://git.io/vfhol <span class=\"pl-k\">&gt;</span> <span class=\"pl-k\">~</span>/.git-completion.bash <span class=\"pl-k\">&amp;&amp;</span> <span class=\"pl-c1\">echo</span> <span class=\"pl-s\"><span class=\"pl-pds\">'</span>[ -f ~/.git-completion.bash ] &amp;&amp; . ~/.git-completion.bash<span class=\"pl-pds\">'</span></span> <span class=\"pl-k\">&gt;&gt;</span> <span class=\"pl-k\">~</span>/.bashrc</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">What changed since two weeks?</h2><a id=\"user-content-what-changed-since-two-weeks\" class=\"anchor\" aria-label=\"Permalink: What changed since two weeks?\" href=\"#what-changed-since-two-weeks\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git log --no-merges --raw --since='2 weeks ago'\"><pre>git log --no-merges --raw --since=<span class=\"pl-s\"><span class=\"pl-pds\">'</span>2 weeks ago<span class=\"pl-pds\">'</span></span></pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git whatchanged --since='2 weeks ago'\"><pre>git whatchanged --since=<span class=\"pl-s\"><span class=\"pl-pds\">'</span>2 weeks ago<span class=\"pl-pds\">'</span></span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">See all commits made since forking from master</h2><a id=\"user-content-see-all-commits-made-since-forking-from-master\" class=\"anchor\" aria-label=\"Permalink: See all commits made since forking from master\" href=\"#see-all-commits-made-since-forking-from-master\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git log --no-merges --stat --reverse master..\"><pre>git log --no-merges --stat --reverse master..</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Pick commits across branches using cherry-pick</h2><a id=\"user-content-pick-commits-across-branches-using-cherry-pick\" class=\"anchor\" aria-label=\"Permalink: Pick commits across branches using cherry-pick\" href=\"#pick-commits-across-branches-using-cherry-pick\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git checkout &lt;branch-name&gt; &amp;&amp; git cherry-pick &lt;commit-ish&gt;\"><pre>git checkout <span class=\"pl-k\">&lt;</span>branch-name<span class=\"pl-k\">&gt;</span> <span class=\"pl-k\">&amp;&amp;</span> git cherry-pick <span class=\"pl-k\">&lt;</span>commit-ish<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Find out branches containing commit-hash</h2><a id=\"user-content-find-out-branches-containing-commit-hash\" class=\"anchor\" aria-label=\"Permalink: Find out branches containing commit-hash\" href=\"#find-out-branches-containing-commit-hash\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git branch -a --contains &lt;commit-ish&gt;\"><pre>git branch -a --contains <span class=\"pl-k\">&lt;</span>commit-ish<span class=\"pl-k\">&gt;</span></pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git branch --contains &lt;commit-ish&gt;\"><pre>git branch --contains <span class=\"pl-k\">&lt;</span>commit-ish<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Git Aliases</h2><a id=\"user-content-git-aliases\" class=\"anchor\" aria-label=\"Permalink: Git Aliases\" href=\"#git-aliases\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git config --global alias.&lt;handle&gt; &lt;command&gt; \ngit config --global alias.st status\"><pre>git config --global alias.<span class=\"pl-k\">&lt;</span>handle<span class=\"pl-k\">&gt;</span> <span class=\"pl-k\">&lt;</span>command<span class=\"pl-k\">&gt;</span> \ngit config --global alias.st status</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Saving current state of tracked files without commiting</h2><a id=\"user-content-saving-current-state-of-tracked-files-without-commiting\" class=\"anchor\" aria-label=\"Permalink: Saving current state of tracked files without commiting\" href=\"#saving-current-state-of-tracked-files-without-commiting\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git stash\"><pre>git stash</pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git stash push\"><pre>git stash push</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Saving current state of unstaged changes to tracked files</h2><a id=\"user-content-saving-current-state-of-unstaged-changes-to-tracked-files\" class=\"anchor\" aria-label=\"Permalink: Saving current state of unstaged changes to tracked files\" href=\"#saving-current-state-of-unstaged-changes-to-tracked-files\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git stash -k\"><pre>git stash -k</pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git stash --keep-index\"><pre>git stash --keep-index</pre></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git stash push --keep-index\"><pre>git stash push --keep-index</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Saving current state including untracked files</h2><a id=\"user-content-saving-current-state-including-untracked-files\" class=\"anchor\" aria-label=\"Permalink: Saving current state including untracked files\" href=\"#saving-current-state-including-untracked-files\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git stash -u\"><pre>git stash -u</pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git stash push -u\"><pre>git stash push -u</pre></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git stash push --include-untracked\"><pre>git stash push --include-untracked</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Saving current state with message</h2><a id=\"user-content-saving-current-state-with-message\" class=\"anchor\" aria-label=\"Permalink: Saving current state with message\" href=\"#saving-current-state-with-message\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git stash push -m &lt;message&gt;\"><pre>git stash push -m <span class=\"pl-k\">&lt;</span>message<span class=\"pl-k\">&gt;</span></pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git stash push --message &lt;message&gt;\"><pre>git stash push --message <span class=\"pl-k\">&lt;</span>message<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Saving current state of all files (ignored, untracked, and tracked)</h2><a id=\"user-content-saving-current-state-of-all-files-ignored-untracked-and-tracked\" class=\"anchor\" aria-label=\"Permalink: Saving current state of all files (ignored, untracked, and tracked)\" href=\"#saving-current-state-of-all-files-ignored-untracked-and-tracked\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git stash -a\"><pre>git stash -a</pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git stash --all\"><pre>git stash --all</pre></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git stash push --all\"><pre>git stash push --all</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Show list of all saved stashes</h2><a id=\"user-content-show-list-of-all-saved-stashes\" class=\"anchor\" aria-label=\"Permalink: Show list of all saved stashes\" href=\"#show-list-of-all-saved-stashes\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git stash list\"><pre>git stash list</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Show the contents of any stash in patch form</h2><a id=\"user-content-show-the-contents-of-any-stash-in-patch-form\" class=\"anchor\" aria-label=\"Permalink: Show the contents of any stash in patch form\" href=\"#show-the-contents-of-any-stash-in-patch-form\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git stash show -p &lt;stash@{n}&gt;\"><pre>git stash show -p <span class=\"pl-k\">&lt;</span>stash@{n}<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Apply any stash without deleting from the stashed list</h2><a id=\"user-content-apply-any-stash-without-deleting-from-the-stashed-list\" class=\"anchor\" aria-label=\"Permalink: Apply any stash without deleting from the stashed list\" href=\"#apply-any-stash-without-deleting-from-the-stashed-list\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git stash apply &lt;stash@{n}&gt;\"><pre>git stash apply <span class=\"pl-k\">&lt;</span>stash@{n}<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Apply last stashed state and delete it from stashed list</h2><a id=\"user-content-apply-last-stashed-state-and-delete-it-from-stashed-list\" class=\"anchor\" aria-label=\"Permalink: Apply last stashed state and delete it from stashed list\" href=\"#apply-last-stashed-state-and-delete-it-from-stashed-list\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git stash pop\"><pre>git stash pop</pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git stash apply stash@{0} &amp;&amp; git stash drop stash@{0}\"><pre>git stash apply stash@{0} <span class=\"pl-k\">&amp;&amp;</span> git stash drop stash@{0}</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Delete all stored stashes</h2><a id=\"user-content-delete-all-stored-stashes\" class=\"anchor\" aria-label=\"Permalink: Delete all stored stashes\" href=\"#delete-all-stored-stashes\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git stash clear\"><pre>git stash clear</pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git stash drop &lt;stash@{n}&gt;\"><pre>git stash drop <span class=\"pl-k\">&lt;</span>stash@{n}<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Grab a single file from a stash</h2><a id=\"user-content-grab-a-single-file-from-a-stash\" class=\"anchor\" aria-label=\"Permalink: Grab a single file from a stash\" href=\"#grab-a-single-file-from-a-stash\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git checkout &lt;stash@{n}&gt; -- &lt;file_path&gt;\"><pre>git checkout <span class=\"pl-k\">&lt;</span>stash@{n}<span class=\"pl-k\">&gt;</span> -- <span class=\"pl-k\">&lt;</span>file_path<span class=\"pl-k\">&gt;</span></pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git checkout stash@{0} -- &lt;file_path&gt;\"><pre>git checkout stash@{0} -- <span class=\"pl-k\">&lt;</span>file_path<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Show all tracked files</h2><a id=\"user-content-show-all-tracked-files\" class=\"anchor\" aria-label=\"Permalink: Show all tracked files\" href=\"#show-all-tracked-files\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git ls-files -t\"><pre>git ls-files -t</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Show all untracked files</h2><a id=\"user-content-show-all-untracked-files\" class=\"anchor\" aria-label=\"Permalink: Show all untracked files\" href=\"#show-all-untracked-files\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git ls-files --others\"><pre>git ls-files --others</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Show all ignored files</h2><a id=\"user-content-show-all-ignored-files\" class=\"anchor\" aria-label=\"Permalink: Show all ignored files\" href=\"#show-all-ignored-files\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git ls-files --others -i --exclude-standard\"><pre>git ls-files --others -i --exclude-standard</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Create new working tree from a repository (git 2.5)</h2><a id=\"user-content-create-new-working-tree-from-a-repository-git-25\" class=\"anchor\" aria-label=\"Permalink: Create new working tree from a repository (git 2.5)\" href=\"#create-new-working-tree-from-a-repository-git-25\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git worktree add -b &lt;branch-name&gt; &lt;path&gt; &lt;start-point&gt;\"><pre>git worktree add -b <span class=\"pl-k\">&lt;</span>branch-name<span class=\"pl-k\">&gt;</span> <span class=\"pl-k\">&lt;</span>path<span class=\"pl-k\">&gt;</span> <span class=\"pl-k\">&lt;</span>start-point<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Create new working tree from HEAD state</h2><a id=\"user-content-create-new-working-tree-from-head-state\" class=\"anchor\" aria-label=\"Permalink: Create new working tree from HEAD state\" href=\"#create-new-working-tree-from-head-state\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git worktree add --detach &lt;path&gt; HEAD\"><pre>git worktree add --detach <span class=\"pl-k\">&lt;</span>path<span class=\"pl-k\">&gt;</span> HEAD</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Untrack files without deleting</h2><a id=\"user-content-untrack-files-without-deleting\" class=\"anchor\" aria-label=\"Permalink: Untrack files without deleting\" href=\"#untrack-files-without-deleting\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git rm --cached &lt;file_path&gt;\"><pre>git rm --cached <span class=\"pl-k\">&lt;</span>file_path<span class=\"pl-k\">&gt;</span></pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git rm --cached -r &lt;directory_path&gt;\"><pre>git rm --cached -r <span class=\"pl-k\">&lt;</span>directory_path<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Before deleting untracked files/directory, do a dry run to get the list of these files/directories</h2><a id=\"user-content-before-deleting-untracked-filesdirectory-do-a-dry-run-to-get-the-list-of-these-filesdirectories\" class=\"anchor\" aria-label=\"Permalink: Before deleting untracked files/directory, do a dry run to get the list of these files/directories\" href=\"#before-deleting-untracked-filesdirectory-do-a-dry-run-to-get-the-list-of-these-filesdirectories\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git clean -n\"><pre>git clean -n</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Forcefully remove untracked files</h2><a id=\"user-content-forcefully-remove-untracked-files\" class=\"anchor\" aria-label=\"Permalink: Forcefully remove untracked files\" href=\"#forcefully-remove-untracked-files\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git clean -f\"><pre>git clean -f</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Forcefully remove untracked directory</h2><a id=\"user-content-forcefully-remove-untracked-directory\" class=\"anchor\" aria-label=\"Permalink: Forcefully remove untracked directory\" href=\"#forcefully-remove-untracked-directory\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git clean -f -d\"><pre>git clean -f -d</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Update all the submodules</h2><a id=\"user-content-update-all-the-submodules\" class=\"anchor\" aria-label=\"Permalink: Update all the submodules\" href=\"#update-all-the-submodules\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git submodule foreach git pull\"><pre>git submodule foreach git pull</pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git submodule update --init --recursive\"><pre>git submodule update --init --recursive</pre></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git submodule update --remote\"><pre>git submodule update --remote</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Show all commits in the current branch yet to be merged to master</h2><a id=\"user-content-show-all-commits-in-the-current-branch-yet-to-be-merged-to-master\" class=\"anchor\" aria-label=\"Permalink: Show all commits in the current branch yet to be merged to master\" href=\"#show-all-commits-in-the-current-branch-yet-to-be-merged-to-master\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git cherry -v master\"><pre>git cherry -v master</pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git cherry -v master &lt;branch-to-be-merged&gt;\"><pre>git cherry -v master <span class=\"pl-k\">&lt;</span>branch-to-be-merged<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Rename a branch</h2><a id=\"user-content-rename-a-branch\" class=\"anchor\" aria-label=\"Permalink: Rename a branch\" href=\"#rename-a-branch\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git branch -m &lt;new-branch-name&gt;\"><pre>git branch -m <span class=\"pl-k\">&lt;</span>new-branch-name<span class=\"pl-k\">&gt;</span></pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git branch -m [&lt;old-branch-name&gt;] &lt;new-branch-name&gt;\"><pre>git branch -m [<span class=\"pl-k\">&lt;</span>old-branch-name<span class=\"pl-k\">&gt;</span>] <span class=\"pl-k\">&lt;</span>new-branch-name<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Rebases 'feature' to 'master' and merges it in to master</h2><a id=\"user-content-rebases-feature-to-master-and-merges-it-in-to-master\" class=\"anchor\" aria-label=\"Permalink: Rebases 'feature' to 'master' and merges it in to master\" href=\"#rebases-feature-to-master-and-merges-it-in-to-master\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git rebase master feature &amp;&amp; git checkout master &amp;&amp; git merge -\"><pre>git rebase master feature <span class=\"pl-k\">&amp;&amp;</span> git checkout master <span class=\"pl-k\">&amp;&amp;</span> git merge -</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Archive the <code>master</code> branch</h2><a id=\"user-content-archive-the-master-branch\" class=\"anchor\" aria-label=\"Permalink: Archive the master branch\" href=\"#archive-the-master-branch\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git archive master --format=zip --output=master.zip\"><pre>git archive master --format=zip --output=master.zip</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Modify previous commit without modifying the commit message</h2><a id=\"user-content-modify-previous-commit-without-modifying-the-commit-message\" class=\"anchor\" aria-label=\"Permalink: Modify previous commit without modifying the commit message\" href=\"#modify-previous-commit-without-modifying-the-commit-message\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git add --all &amp;&amp; git commit --amend --no-edit\"><pre>git add --all <span class=\"pl-k\">&amp;&amp;</span> git commit --amend --no-edit</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Prunes references to remove branches that have been deleted in the remote.</h2><a id=\"user-content-prunes-references-to-remove-branches-that-have-been-deleted-in-the-remote\" class=\"anchor\" aria-label=\"Permalink: Prunes references to remove branches that have been deleted in the remote.\" href=\"#prunes-references-to-remove-branches-that-have-been-deleted-in-the-remote\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git fetch -p\"><pre>git fetch -p</pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git remote prune origin\"><pre>git remote prune origin</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Delete local branches that has been squash and merged in the remote.</h2><a id=\"user-content-delete-local-branches-that-has-been-squash-and-merged-in-the-remote\" class=\"anchor\" aria-label=\"Permalink: Delete local branches that has been squash and merged in the remote.\" href=\"#delete-local-branches-that-has-been-squash-and-merged-in-the-remote\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git branch -vv | grep ': gone]' | awk '{print &lt;!-- @doxie.inject start --&gt;}' | xargs git branch -D\"><pre>git branch -vv <span class=\"pl-k\">|</span> grep <span class=\"pl-s\"><span class=\"pl-pds\">'</span>: gone]<span class=\"pl-pds\">'</span></span> <span class=\"pl-k\">|</span> awk <span class=\"pl-s\"><span class=\"pl-pds\">'</span>{print &lt;!-- @doxie.inject start --&gt;}<span class=\"pl-pds\">'</span></span> <span class=\"pl-k\">|</span> xargs git branch -D</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Retrieve the commit hash of the initial revision.</h2><a id=\"user-content-retrieve-the-commit-hash-of-the-initial-revision\" class=\"anchor\" aria-label=\"Permalink: Retrieve the commit hash of the initial revision.\" href=\"#retrieve-the-commit-hash-of-the-initial-revision\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\" git rev-list --reverse HEAD | head -1\"><pre> git rev-list --reverse HEAD <span class=\"pl-k\">|</span> head -1</pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git rev-list --max-parents=0 HEAD\"><pre>git rev-list --max-parents=0 HEAD</pre></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git log --pretty=oneline | tail -1 | cut -c 1-40\"><pre>git log --pretty=oneline <span class=\"pl-k\">|</span> tail -1 <span class=\"pl-k\">|</span> cut -c 1-40</pre></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git log --pretty=oneline --reverse | head -1 | cut -c 1-40\"><pre>git log --pretty=oneline --reverse <span class=\"pl-k\">|</span> head -1 <span class=\"pl-k\">|</span> cut -c 1-40</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Visualize the version tree.</h2><a id=\"user-content-visualize-the-version-tree\" class=\"anchor\" aria-label=\"Permalink: Visualize the version tree.\" href=\"#visualize-the-version-tree\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git log --pretty=oneline --graph --decorate --all\"><pre>git log --pretty=oneline --graph --decorate --all</pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"gitk --all\"><pre>gitk --all</pre></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git log --graph --pretty=format:'%C(auto) %h | %s | %an | %ar%d'\"><pre>git log --graph --pretty=format:<span class=\"pl-s\"><span class=\"pl-pds\">'</span>%C(auto) %h | %s | %an | %ar%d<span class=\"pl-pds\">'</span></span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Visualize the tree including commits that are only referenced from reflogs</h2><a id=\"user-content-visualize-the-tree-including-commits-that-are-only-referenced-from-reflogs\" class=\"anchor\" aria-label=\"Permalink: Visualize the tree including commits that are only referenced from reflogs\" href=\"#visualize-the-tree-including-commits-that-are-only-referenced-from-reflogs\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git log --graph --decorate --oneline $(git rev-list --walk-reflogs --all)\"><pre>git log --graph --decorate --oneline <span class=\"pl-s\"><span class=\"pl-pds\">$(</span>git rev-list --walk-reflogs --all<span class=\"pl-pds\">)</span></span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Deploying git tracked subfolder to gh-pages</h2><a id=\"user-content-deploying-git-tracked-subfolder-to-gh-pages\" class=\"anchor\" aria-label=\"Permalink: Deploying git tracked subfolder to gh-pages\" href=\"#deploying-git-tracked-subfolder-to-gh-pages\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git subtree push --prefix subfolder_name origin gh-pages\"><pre>git subtree push --prefix subfolder_name origin gh-pages</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Adding a project to repo using subtree</h2><a id=\"user-content-adding-a-project-to-repo-using-subtree\" class=\"anchor\" aria-label=\"Permalink: Adding a project to repo using subtree\" href=\"#adding-a-project-to-repo-using-subtree\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git subtree add --prefix=&lt;directory_name&gt;/&lt;project_name&gt; --squash [email protected]:&lt;username&gt;/&lt;project_name&gt;.git master\"><pre>git subtree add --prefix=<span class=\"pl-k\">&lt;</span>directory_name<span class=\"pl-k\">&gt;</span>/<span class=\"pl-k\">&lt;</span>project_name<span class=\"pl-k\">&gt;</span> --squash [email protected]:<span class=\"pl-k\">&lt;</span>username<span class=\"pl-k\">&gt;</span>/<span class=\"pl-k\">&lt;</span>project_name<span class=\"pl-k\">&gt;</span>.git master</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Get latest changes in your repo for a linked project using subtree</h2><a id=\"user-content-get-latest-changes-in-your-repo-for-a-linked-project-using-subtree\" class=\"anchor\" aria-label=\"Permalink: Get latest changes in your repo for a linked project using subtree\" href=\"#get-latest-changes-in-your-repo-for-a-linked-project-using-subtree\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git subtree pull --prefix=&lt;directory_name&gt;/&lt;project_name&gt; --squash [email protected]:&lt;username&gt;/&lt;project_name&gt;.git master\"><pre>git subtree pull --prefix=<span class=\"pl-k\">&lt;</span>directory_name<span class=\"pl-k\">&gt;</span>/<span class=\"pl-k\">&lt;</span>project_name<span class=\"pl-k\">&gt;</span> --squash [email protected]:<span class=\"pl-k\">&lt;</span>username<span class=\"pl-k\">&gt;</span>/<span class=\"pl-k\">&lt;</span>project_name<span class=\"pl-k\">&gt;</span>.git master</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Export a branch with history to a file.</h2><a id=\"user-content-export-a-branch-with-history-to-a-file\" class=\"anchor\" aria-label=\"Permalink: Export a branch with history to a file.\" href=\"#export-a-branch-with-history-to-a-file\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git bundle create &lt;file&gt; &lt;branch-name&gt;\"><pre>git bundle create <span class=\"pl-k\">&lt;</span>file<span class=\"pl-k\">&gt;</span> <span class=\"pl-k\">&lt;</span>branch-name<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Import from a bundle</h2><a id=\"user-content-import-from-a-bundle\" class=\"anchor\" aria-label=\"Permalink: Import from a bundle\" href=\"#import-from-a-bundle\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git clone repo.bundle &lt;repo-dir&gt; -b &lt;branch-name&gt;\"><pre>git clone repo.bundle <span class=\"pl-k\">&lt;</span>repo-dir<span class=\"pl-k\">&gt;</span> -b <span class=\"pl-k\">&lt;</span>branch-name<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Get the name of current branch.</h2><a id=\"user-content-get-the-name-of-current-branch\" class=\"anchor\" aria-label=\"Permalink: Get the name of current branch.\" href=\"#get-the-name-of-current-branch\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git rev-parse --abbrev-ref HEAD\"><pre>git rev-parse --abbrev-ref HEAD</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Ignore one file on commit (e.g. Changelog).</h2><a id=\"user-content-ignore-one-file-on-commit-eg-changelog\" class=\"anchor\" aria-label=\"Permalink: Ignore one file on commit (e.g. Changelog).\" href=\"#ignore-one-file-on-commit-eg-changelog\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git update-index --assume-unchanged Changelog; git commit -a; git update-index --no-assume-unchanged Changelog\"><pre>git update-index --assume-unchanged Changelog<span class=\"pl-k\">;</span> git commit -a<span class=\"pl-k\">;</span> git update-index --no-assume-unchanged Changelog</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Stash changes before rebasing</h2><a id=\"user-content-stash-changes-before-rebasing\" class=\"anchor\" aria-label=\"Permalink: Stash changes before rebasing\" href=\"#stash-changes-before-rebasing\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git rebase --autostash\"><pre>git rebase --autostash</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Fetch pull request by ID to a local branch</h2><a id=\"user-content-fetch-pull-request-by-id-to-a-local-branch\" class=\"anchor\" aria-label=\"Permalink: Fetch pull request by ID to a local branch\" href=\"#fetch-pull-request-by-id-to-a-local-branch\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git fetch origin pull/&lt;id&gt;/head:&lt;branch-name&gt;\"><pre>git fetch origin pull/<span class=\"pl-k\">&lt;</span>id<span class=\"pl-k\">&gt;</span>/head:<span class=\"pl-k\">&lt;</span>branch-name<span class=\"pl-k\">&gt;</span></pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git pull origin pull/&lt;id&gt;/head:&lt;branch-name&gt;\"><pre>git pull origin pull/<span class=\"pl-k\">&lt;</span>id<span class=\"pl-k\">&gt;</span>/head:<span class=\"pl-k\">&lt;</span>branch-name<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Show the most recent tag on the current branch.</h2><a id=\"user-content-show-the-most-recent-tag-on-the-current-branch\" class=\"anchor\" aria-label=\"Permalink: Show the most recent tag on the current branch.\" href=\"#show-the-most-recent-tag-on-the-current-branch\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git describe --tags --abbrev=0\"><pre>git describe --tags --abbrev=0</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Show inline word diff.</h2><a id=\"user-content-show-inline-word-diff\" class=\"anchor\" aria-label=\"Permalink: Show inline word diff.\" href=\"#show-inline-word-diff\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git diff --word-diff\"><pre>git diff --word-diff</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Show changes using common diff tools.</h2><a id=\"user-content-show-changes-using-common-diff-tools\" class=\"anchor\" aria-label=\"Permalink: Show changes using common diff tools.\" href=\"#show-changes-using-common-diff-tools\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git difftool [-t &lt;tool&gt;] &lt;commit1&gt; &lt;commit2&gt; &lt;path&gt;\"><pre>git difftool [-t <span class=\"pl-k\">&lt;</span>tool<span class=\"pl-k\">&gt;</span>] <span class=\"pl-k\">&lt;</span>commit<span class=\"pl-k\">1&gt;</span> <span class=\"pl-k\">&lt;</span>commit<span class=\"pl-k\">2&gt;</span> <span class=\"pl-k\">&lt;</span>path<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Don’t consider changes for tracked file.</h2><a id=\"user-content-dont-consider-changes-for-tracked-file\" class=\"anchor\" aria-label=\"Permalink: Don’t consider changes for tracked file.\" href=\"#dont-consider-changes-for-tracked-file\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git update-index --assume-unchanged &lt;file_name&gt;\"><pre>git update-index --assume-unchanged <span class=\"pl-k\">&lt;</span>file_name<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Undo assume-unchanged.</h2><a id=\"user-content-undo-assume-unchanged\" class=\"anchor\" aria-label=\"Permalink: Undo assume-unchanged.\" href=\"#undo-assume-unchanged\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git update-index --no-assume-unchanged &lt;file_name&gt;\"><pre>git update-index --no-assume-unchanged <span class=\"pl-k\">&lt;</span>file_name<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Clean the files from <code>.gitignore</code>.</h2><a id=\"user-content-clean-the-files-from-gitignore\" class=\"anchor\" aria-label=\"Permalink: Clean the files from .gitignore.\" href=\"#clean-the-files-from-gitignore\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git clean -X -f\"><pre>git clean -X -f</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Restore deleted file.</h2><a id=\"user-content-restore-deleted-file\" class=\"anchor\" aria-label=\"Permalink: Restore deleted file.\" href=\"#restore-deleted-file\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git checkout &lt;deleting_commit&gt; -- &lt;file_path&gt;\"><pre>git checkout <span class=\"pl-k\">&lt;</span>deleting_commit<span class=\"pl-k\">&gt;</span> -- <span class=\"pl-k\">&lt;</span>file_path<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Restore file to a specific commit-hash</h2><a id=\"user-content-restore-file-to-a-specific-commit-hash\" class=\"anchor\" aria-label=\"Permalink: Restore file to a specific commit-hash\" href=\"#restore-file-to-a-specific-commit-hash\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git checkout &lt;commit-ish&gt; -- &lt;file_path&gt;\"><pre>git checkout <span class=\"pl-k\">&lt;</span>commit-ish<span class=\"pl-k\">&gt;</span> -- <span class=\"pl-k\">&lt;</span>file_path<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Always rebase instead of merge on pull.</h2><a id=\"user-content-always-rebase-instead-of-merge-on-pull\" class=\"anchor\" aria-label=\"Permalink: Always rebase instead of merge on pull.\" href=\"#always-rebase-instead-of-merge-on-pull\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git config --global pull.rebase true\"><pre>git config --global pull.rebase <span class=\"pl-c1\">true</span></pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"#git &lt; 1.7.9\ngit config --global branch.autosetuprebase always\"><pre><span class=\"pl-c\"><span class=\"pl-c\">#</span>git &lt; 1.7.9</span>\ngit config --global branch.autosetuprebase always</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">List all the alias and configs.</h2><a id=\"user-content-list-all-the-alias-and-configs\" class=\"anchor\" aria-label=\"Permalink: List all the alias and configs.\" href=\"#list-all-the-alias-and-configs\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git config --list\"><pre>git config --list</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Make git case sensitive.</h2><a id=\"user-content-make-git-case-sensitive\" class=\"anchor\" aria-label=\"Permalink: Make git case sensitive.\" href=\"#make-git-case-sensitive\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git config --global core.ignorecase false\"><pre>git config --global core.ignorecase <span class=\"pl-c1\">false</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Add custom editors.</h2><a id=\"user-content-add-custom-editors\" class=\"anchor\" aria-label=\"Permalink: Add custom editors.\" href=\"#add-custom-editors\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git config --global core.editor '$EDITOR'\"><pre>git config --global core.editor <span class=\"pl-s\"><span class=\"pl-pds\">'</span>$EDITOR<span class=\"pl-pds\">'</span></span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Auto correct typos.</h2><a id=\"user-content-auto-correct-typos\" class=\"anchor\" aria-label=\"Permalink: Auto correct typos.\" href=\"#auto-correct-typos\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git config --global help.autocorrect 1\"><pre>git config --global help.autocorrect 1</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Check if the change was a part of a release.</h2><a id=\"user-content-check-if-the-change-was-a-part-of-a-release\" class=\"anchor\" aria-label=\"Permalink: Check if the change was a part of a release.\" href=\"#check-if-the-change-was-a-part-of-a-release\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git name-rev --name-only &lt;SHA-1&gt;\"><pre>git name-rev --name-only <span class=\"pl-k\">&lt;</span>SHA-<span class=\"pl-k\">1&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Dry run. (any command that supports dry-run flag should do.)</h2><a id=\"user-content-dry-run-any-command-that-supports-dry-run-flag-should-do\" class=\"anchor\" aria-label=\"Permalink: Dry run. (any command that supports dry-run flag should do.)\" href=\"#dry-run-any-command-that-supports-dry-run-flag-should-do\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git clean -fd --dry-run\"><pre>git clean -fd --dry-run</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Marks your commit as a fix of a previous commit.</h2><a id=\"user-content-marks-your-commit-as-a-fix-of-a-previous-commit\" class=\"anchor\" aria-label=\"Permalink: Marks your commit as a fix of a previous commit.\" href=\"#marks-your-commit-as-a-fix-of-a-previous-commit\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git commit --fixup &lt;SHA-1&gt;\"><pre>git commit --fixup <span class=\"pl-k\">&lt;</span>SHA-<span class=\"pl-k\">1&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Squash fixup commits normal commits.</h2><a id=\"user-content-squash-fixup-commits-normal-commits\" class=\"anchor\" aria-label=\"Permalink: Squash fixup commits normal commits.\" href=\"#squash-fixup-commits-normal-commits\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git rebase -i --autosquash\"><pre>git rebase -i --autosquash</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Skip staging area during commit.</h2><a id=\"user-content-skip-staging-area-during-commit\" class=\"anchor\" aria-label=\"Permalink: Skip staging area during commit.\" href=\"#skip-staging-area-during-commit\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git commit --only &lt;file_path&gt;\"><pre>git commit --only <span class=\"pl-k\">&lt;</span>file_path<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Interactive staging.</h2><a id=\"user-content-interactive-staging\" class=\"anchor\" aria-label=\"Permalink: Interactive staging.\" href=\"#interactive-staging\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git add -i\"><pre>git add -i</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">List ignored files.</h2><a id=\"user-content-list-ignored-files\" class=\"anchor\" aria-label=\"Permalink: List ignored files.\" href=\"#list-ignored-files\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git check-ignore *\"><pre>git check-ignore <span class=\"pl-k\">*</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Status of ignored files.</h2><a id=\"user-content-status-of-ignored-files\" class=\"anchor\" aria-label=\"Permalink: Status of ignored files.\" href=\"#status-of-ignored-files\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git status --ignored\"><pre>git status --ignored</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Commits in Branch1 that are not in Branch2</h2><a id=\"user-content-commits-in-branch1-that-are-not-in-branch2\" class=\"anchor\" aria-label=\"Permalink: Commits in Branch1 that are not in Branch2\" href=\"#commits-in-branch1-that-are-not-in-branch2\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git log Branch1 ^Branch2\"><pre>git log Branch1 ^Branch2</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">List n last commits</h2><a id=\"user-content-list-n-last-commits\" class=\"anchor\" aria-label=\"Permalink: List n last commits\" href=\"#list-n-last-commits\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git log -&lt;n&gt;\"><pre>git log -<span class=\"pl-k\">&lt;</span>n<span class=\"pl-k\">&gt;</span></pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git log -n &lt;n&gt;\"><pre>git log -n <span class=\"pl-k\">&lt;</span>n<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Reuse recorded resolution, record and reuse previous conflicts resolutions.</h2><a id=\"user-content-reuse-recorded-resolution-record-and-reuse-previous-conflicts-resolutions\" class=\"anchor\" aria-label=\"Permalink: Reuse recorded resolution, record and reuse previous conflicts resolutions.\" href=\"#reuse-recorded-resolution-record-and-reuse-previous-conflicts-resolutions\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git config --global rerere.enabled 1\"><pre>git config --global rerere.enabled 1</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Open all conflicted files in an editor.</h2><a id=\"user-content-open-all-conflicted-files-in-an-editor\" class=\"anchor\" aria-label=\"Permalink: Open all conflicted files in an editor.\" href=\"#open-all-conflicted-files-in-an-editor\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git diff --name-only | uniq | xargs $EDITOR\"><pre>git diff --name-only <span class=\"pl-k\">|</span> uniq <span class=\"pl-k\">|</span> xargs <span class=\"pl-smi\">$EDITOR</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Count unpacked number of objects and their disk consumption.</h2><a id=\"user-content-count-unpacked-number-of-objects-and-their-disk-consumption\" class=\"anchor\" aria-label=\"Permalink: Count unpacked number of objects and their disk consumption.\" href=\"#count-unpacked-number-of-objects-and-their-disk-consumption\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git count-objects --human-readable\"><pre>git count-objects --human-readable</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Prune all unreachable objects from the object database.</h2><a id=\"user-content-prune-all-unreachable-objects-from-the-object-database\" class=\"anchor\" aria-label=\"Permalink: Prune all unreachable objects from the object database.\" href=\"#prune-all-unreachable-objects-from-the-object-database\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git gc --prune=now --aggressive\"><pre>git gc --prune=now --aggressive</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Instantly browse your working repository in gitweb.</h2><a id=\"user-content-instantly-browse-your-working-repository-in-gitweb\" class=\"anchor\" aria-label=\"Permalink: Instantly browse your working repository in gitweb.\" href=\"#instantly-browse-your-working-repository-in-gitweb\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git instaweb [--local] [--httpd=&lt;httpd&gt;] [--port=&lt;port&gt;] [--browser=&lt;browser&gt;]\"><pre>git instaweb [--local] [--httpd<span class=\"pl-k\">=&lt;</span>httpd<span class=\"pl-k\">&gt;</span>] [--port<span class=\"pl-k\">=&lt;</span>port<span class=\"pl-k\">&gt;</span>] [--browser<span class=\"pl-k\">=&lt;</span>browser<span class=\"pl-k\">&gt;</span>]</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">View the GPG signatures in the commit log</h2><a id=\"user-content-view-the-gpg-signatures-in-the-commit-log\" class=\"anchor\" aria-label=\"Permalink: View the GPG signatures in the commit log\" href=\"#view-the-gpg-signatures-in-the-commit-log\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git log --show-signature\"><pre>git log --show-signature</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Remove entry in the global config.</h2><a id=\"user-content-remove-entry-in-the-global-config\" class=\"anchor\" aria-label=\"Permalink: Remove entry in the global config.\" href=\"#remove-entry-in-the-global-config\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git config --global --unset &lt;entry-name&gt;\"><pre>git config --global --unset <span class=\"pl-k\">&lt;</span>entry-name<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Checkout a new branch without any history</h2><a id=\"user-content-checkout-a-new-branch-without-any-history\" class=\"anchor\" aria-label=\"Permalink: Checkout a new branch without any history\" href=\"#checkout-a-new-branch-without-any-history\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git checkout --orphan &lt;branch_name&gt;\"><pre>git checkout --orphan <span class=\"pl-k\">&lt;</span>branch_name<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Extract file from another branch.</h2><a id=\"user-content-extract-file-from-another-branch\" class=\"anchor\" aria-label=\"Permalink: Extract file from another branch.\" href=\"#extract-file-from-another-branch\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git show &lt;branch_name&gt;:&lt;file_name&gt;\"><pre>git show <span class=\"pl-k\">&lt;</span>branch_name<span class=\"pl-k\">&gt;</span>:<span class=\"pl-k\">&lt;</span>file_name<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">List only the root and merge commits.</h2><a id=\"user-content-list-only-the-root-and-merge-commits\" class=\"anchor\" aria-label=\"Permalink: List only the root and merge commits.\" href=\"#list-only-the-root-and-merge-commits\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git log --first-parent\"><pre>git log --first-parent</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Change previous two commits with an interactive rebase.</h2><a id=\"user-content-change-previous-two-commits-with-an-interactive-rebase\" class=\"anchor\" aria-label=\"Permalink: Change previous two commits with an interactive rebase.\" href=\"#change-previous-two-commits-with-an-interactive-rebase\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git rebase --interactive HEAD~2\"><pre>git rebase --interactive HEAD~2</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">List all branch is WIP</h2><a id=\"user-content-list-all-branch-is-wip\" class=\"anchor\" aria-label=\"Permalink: List all branch is WIP\" href=\"#list-all-branch-is-wip\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git checkout master &amp;&amp; git branch --no-merged\"><pre>git checkout master <span class=\"pl-k\">&amp;&amp;</span> git branch --no-merged</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Find guilty with binary search</h2><a id=\"user-content-find-guilty-with-binary-search\" class=\"anchor\" aria-label=\"Permalink: Find guilty with binary search\" href=\"#find-guilty-with-binary-search\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git bisect start # Search start \ngit bisect bad # Set point to bad commit \ngit bisect good v2.6.13-rc2 # Set point to good commit|tag \ngit bisect bad # Say current state is bad \ngit bisect good # Say current state is good \ngit bisect reset # Finish search \n\"><pre>git bisect start <span class=\"pl-c\"><span class=\"pl-c\">#</span> Search start </span>\ngit bisect bad <span class=\"pl-c\"><span class=\"pl-c\">#</span> Set point to bad commit </span>\ngit bisect good v2.6.13-rc2 <span class=\"pl-c\"><span class=\"pl-c\">#</span> Set point to good commit|tag </span>\ngit bisect bad <span class=\"pl-c\"><span class=\"pl-c\">#</span> Say current state is bad </span>\ngit bisect good <span class=\"pl-c\"><span class=\"pl-c\">#</span> Say current state is good </span>\ngit bisect reset <span class=\"pl-c\"><span class=\"pl-c\">#</span> Finish search </span>\n</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Bypass pre-commit and commit-msg githooks</h2><a id=\"user-content-bypass-pre-commit-and-commit-msg-githooks\" class=\"anchor\" aria-label=\"Permalink: Bypass pre-commit and commit-msg githooks\" href=\"#bypass-pre-commit-and-commit-msg-githooks\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git commit --no-verify\"><pre>git commit --no-verify</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">List commits and changes to a specific file (even through renaming)</h2><a id=\"user-content-list-commits-and-changes-to-a-specific-file-even-through-renaming\" class=\"anchor\" aria-label=\"Permalink: List commits and changes to a specific file (even through renaming)\" href=\"#list-commits-and-changes-to-a-specific-file-even-through-renaming\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git log --follow -p -- &lt;file_path&gt;\"><pre>git log --follow -p -- <span class=\"pl-k\">&lt;</span>file_path<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Clone a single branch</h2><a id=\"user-content-clone-a-single-branch\" class=\"anchor\" aria-label=\"Permalink: Clone a single branch\" href=\"#clone-a-single-branch\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git clone -b &lt;branch-name&gt; --single-branch https://github.com/user/repo.git\"><pre>git clone -b <span class=\"pl-k\">&lt;</span>branch-name<span class=\"pl-k\">&gt;</span> --single-branch https://github.com/user/repo.git</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Create and switch new branch</h2><a id=\"user-content-create-and-switch-new-branch\" class=\"anchor\" aria-label=\"Permalink: Create and switch new branch\" href=\"#create-and-switch-new-branch\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git checkout -b &lt;branch-name&gt;\"><pre>git checkout -b <span class=\"pl-k\">&lt;</span>branch-name<span class=\"pl-k\">&gt;</span></pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git branch &lt;branch-name&gt; &amp;&amp; git checkout &lt;branch-name&gt;\"><pre>git branch <span class=\"pl-k\">&lt;</span>branch-name<span class=\"pl-k\">&gt;</span> <span class=\"pl-k\">&amp;&amp;</span> git checkout <span class=\"pl-k\">&lt;</span>branch-name<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git switch -c &lt;branch-name&gt;\"><pre>git switch -c <span class=\"pl-k\">&lt;</span>branch-name<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Ignore file mode changes on commits</h2><a id=\"user-content-ignore-file-mode-changes-on-commits\" class=\"anchor\" aria-label=\"Permalink: Ignore file mode changes on commits\" href=\"#ignore-file-mode-changes-on-commits\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git config core.fileMode false\"><pre>git config core.fileMode <span class=\"pl-c1\">false</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Turn off git colored terminal output</h2><a id=\"user-content-turn-off-git-colored-terminal-output\" class=\"anchor\" aria-label=\"Permalink: Turn off git colored terminal output\" href=\"#turn-off-git-colored-terminal-output\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git config --global color.ui false\"><pre>git config --global color.ui <span class=\"pl-c1\">false</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Specific color settings</h2><a id=\"user-content-specific-color-settings\" class=\"anchor\" aria-label=\"Permalink: Specific color settings\" href=\"#specific-color-settings\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git config --global &lt;specific command e.g branch, diff&gt; &lt;true, false or always&gt;\"><pre>git config --global <span class=\"pl-k\">&lt;</span>specific <span class=\"pl-c1\">command</span> e.g branch, diff<span class=\"pl-k\">&gt;</span> <span class=\"pl-k\">&lt;</span>true, <span class=\"pl-c1\">false</span> or always<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Show all local branches ordered by recent commits</h2><a id=\"user-content-show-all-local-branches-ordered-by-recent-commits\" class=\"anchor\" aria-label=\"Permalink: Show all local branches ordered by recent commits\" href=\"#show-all-local-branches-ordered-by-recent-commits\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git for-each-ref --sort=-committerdate --format='%(refname:short)' refs/heads/\"><pre>git for-each-ref --sort=-committerdate --format=<span class=\"pl-s\"><span class=\"pl-pds\">'</span>%(refname:short)<span class=\"pl-pds\">'</span></span> refs/heads/</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Find lines matching the pattern (regex or string) in tracked files</h2><a id=\"user-content-find-lines-matching-the-pattern-regex-or-string-in-tracked-files\" class=\"anchor\" aria-label=\"Permalink: Find lines matching the pattern (regex or string) in tracked files\" href=\"#find-lines-matching-the-pattern-regex-or-string-in-tracked-files\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git grep --heading --line-number 'foo bar'\"><pre>git grep --heading --line-number <span class=\"pl-s\"><span class=\"pl-pds\">'</span>foo bar<span class=\"pl-pds\">'</span></span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Clone a shallow copy of a repository</h2><a id=\"user-content-clone-a-shallow-copy-of-a-repository\" class=\"anchor\" aria-label=\"Permalink: Clone a shallow copy of a repository\" href=\"#clone-a-shallow-copy-of-a-repository\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git clone https://github.com/user/repo.git --depth 1\"><pre>git clone https://github.com/user/repo.git --depth 1</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Search Commit log across all branches for given text</h2><a id=\"user-content-search-commit-log-across-all-branches-for-given-text\" class=\"anchor\" aria-label=\"Permalink: Search Commit log across all branches for given text\" href=\"#search-commit-log-across-all-branches-for-given-text\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git log --all --grep='&lt;given-text&gt;'\"><pre>git log --all --grep=<span class=\"pl-s\"><span class=\"pl-pds\">'</span>&lt;given-text&gt;<span class=\"pl-pds\">'</span></span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Get first commit in a branch (from master)</h2><a id=\"user-content-get-first-commit-in-a-branch-from-master\" class=\"anchor\" aria-label=\"Permalink: Get first commit in a branch (from master)\" href=\"#get-first-commit-in-a-branch-from-master\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git log --oneline master..&lt;branch-name&gt; | tail -1\"><pre>git log --oneline master..<span class=\"pl-k\">&lt;</span>branch-name<span class=\"pl-k\">&gt;</span> <span class=\"pl-k\">|</span> tail -1</pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git log --reverse master..&lt;branch-name&gt; | head -6\"><pre>git log --reverse master..<span class=\"pl-k\">&lt;</span>branch-name<span class=\"pl-k\">&gt;</span> <span class=\"pl-k\">|</span> head -6</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Unstaging Staged file</h2><a id=\"user-content-unstaging-staged-file\" class=\"anchor\" aria-label=\"Permalink: Unstaging Staged file\" href=\"#unstaging-staged-file\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git reset HEAD &lt;file-name&gt;\"><pre>git reset HEAD <span class=\"pl-k\">&lt;</span>file-name<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Force push to Remote Repository</h2><a id=\"user-content-force-push-to-remote-repository\" class=\"anchor\" aria-label=\"Permalink: Force push to Remote Repository\" href=\"#force-push-to-remote-repository\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git push -f &lt;remote-name&gt; &lt;branch-name&gt;\"><pre>git push -f <span class=\"pl-k\">&lt;</span>remote-name<span class=\"pl-k\">&gt;</span> <span class=\"pl-k\">&lt;</span>branch-name<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Adding Remote name</h2><a id=\"user-content-adding-remote-name\" class=\"anchor\" aria-label=\"Permalink: Adding Remote name\" href=\"#adding-remote-name\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git remote add &lt;remote-nickname&gt; &lt;remote-url&gt;\"><pre>git remote add <span class=\"pl-k\">&lt;</span>remote-nickname<span class=\"pl-k\">&gt;</span> <span class=\"pl-k\">&lt;</span>remote-url<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">List all currently configured remotes</h2><a id=\"user-content-list-all-currently-configured-remotes\" class=\"anchor\" aria-label=\"Permalink: List all currently configured remotes\" href=\"#list-all-currently-configured-remotes\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git remote -v\"><pre>git remote -v</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Show the author, time and last revision made to each line of a given file</h2><a id=\"user-content-show-the-author-time-and-last-revision-made-to-each-line-of-a-given-file\" class=\"anchor\" aria-label=\"Permalink: Show the author, time and last revision made to each line of a given file\" href=\"#show-the-author-time-and-last-revision-made-to-each-line-of-a-given-file\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git blame &lt;file-name&gt;\"><pre>git blame <span class=\"pl-k\">&lt;</span>file-name<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Group commits by authors and title</h2><a id=\"user-content-group-commits-by-authors-and-title\" class=\"anchor\" aria-label=\"Permalink: Group commits by authors and title\" href=\"#group-commits-by-authors-and-title\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git shortlog\"><pre>git shortlog</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Forced push but still ensure you don't overwrite other's work</h2><a id=\"user-content-forced-push-but-still-ensure-you-dont-overwrite-others-work\" class=\"anchor\" aria-label=\"Permalink: Forced push but still ensure you don't overwrite other's work\" href=\"#forced-push-but-still-ensure-you-dont-overwrite-others-work\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git push --force-with-lease &lt;remote-name&gt; &lt;branch-name&gt;\"><pre>git push --force-with-lease <span class=\"pl-k\">&lt;</span>remote-name<span class=\"pl-k\">&gt;</span> <span class=\"pl-k\">&lt;</span>branch-name<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Show how many lines does an author contribute</h2><a id=\"user-content-show-how-many-lines-does-an-author-contribute\" class=\"anchor\" aria-label=\"Permalink: Show how many lines does an author contribute\" href=\"#show-how-many-lines-does-an-author-contribute\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git log --author='_Your_Name_Here_' --pretty=tformat: --numstat | gawk '{ add += &lt;!-- @doxie.inject start --&gt;; subs += &lt;!-- @doxie.inject end --&gt;; loc += &lt;!-- @doxie.inject start --&gt; - &lt;!-- @doxie.inject end --&gt; } END { printf &quot;added lines: %s removed lines: %s total lines: %s\n&quot;, add, subs, loc }' -\"><pre>git log --author=<span class=\"pl-s\"><span class=\"pl-pds\">'</span>_Your_Name_Here_<span class=\"pl-pds\">'</span></span> --pretty=tformat: --numstat <span class=\"pl-k\">|</span> gawk <span class=\"pl-s\"><span class=\"pl-pds\">'</span>{ add += &lt;!-- @doxie.inject start --&gt;; subs += &lt;!-- @doxie.inject end --&gt;; loc += &lt;!-- @doxie.inject start --&gt; - &lt;!-- @doxie.inject end --&gt; } END { printf \"added lines: %s removed lines: %s total lines: %s</span>\n<span class=\"pl-s\">\", add, subs, loc }<span class=\"pl-pds\">'</span></span> -</pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git log --author='_Your_Name_Here_' --pretty=tformat: --numstat | awk '{ add += &lt;!-- @doxie.inject start --&gt;; subs += &lt;!-- @doxie.inject end --&gt;; loc += &lt;!-- @doxie.inject start --&gt; - &lt;!-- @doxie.inject end --&gt; } END { printf &quot;added lines: %s, removed lines: %s, total lines: %s\n&quot;, add, subs, loc }' - # on Mac OSX\"><pre>git log --author=<span class=\"pl-s\"><span class=\"pl-pds\">'</span>_Your_Name_Here_<span class=\"pl-pds\">'</span></span> --pretty=tformat: --numstat <span class=\"pl-k\">|</span> awk <span class=\"pl-s\"><span class=\"pl-pds\">'</span>{ add += &lt;!-- @doxie.inject start --&gt;; subs += &lt;!-- @doxie.inject end --&gt;; loc += &lt;!-- @doxie.inject start --&gt; - &lt;!-- @doxie.inject end --&gt; } END { printf \"added lines: %s, removed lines: %s, total lines: %s</span>\n<span class=\"pl-s\">\", add, subs, loc }<span class=\"pl-pds\">'</span></span> - <span class=\"pl-c\"><span class=\"pl-c\">#</span> on Mac OSX</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Revert: Reverting an entire merge</h2><a id=\"user-content-revert-reverting-an-entire-merge\" class=\"anchor\" aria-label=\"Permalink: Revert: Reverting an entire merge\" href=\"#revert-reverting-an-entire-merge\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git revert -m 1 &lt;commit-ish&gt;\"><pre>git revert -m 1 <span class=\"pl-k\">&lt;</span>commit-ish<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Number of commits in a branch</h2><a id=\"user-content-number-of-commits-in-a-branch\" class=\"anchor\" aria-label=\"Permalink: Number of commits in a branch\" href=\"#number-of-commits-in-a-branch\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git rev-list --count &lt;branch-name&gt;\"><pre>git rev-list --count <span class=\"pl-k\">&lt;</span>branch-name<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Alias: git undo</h2><a id=\"user-content-alias-git-undo\" class=\"anchor\" aria-label=\"Permalink: Alias: git undo\" href=\"#alias-git-undo\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git config --global alias.undo '!f() { git reset --hard $(git rev-parse --abbrev-ref HEAD)@{${1-1}}; }; f'\"><pre>git config --global alias.undo <span class=\"pl-s\"><span class=\"pl-pds\">'</span>!f() { git reset --hard $(git rev-parse --abbrev-ref HEAD)@{${1-1}}; }; f<span class=\"pl-pds\">'</span></span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Add object notes</h2><a id=\"user-content-add-object-notes\" class=\"anchor\" aria-label=\"Permalink: Add object notes\" href=\"#add-object-notes\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git notes add -m 'Note on the previous commit....'\"><pre>git notes add -m <span class=\"pl-s\"><span class=\"pl-pds\">'</span>Note on the previous commit....<span class=\"pl-pds\">'</span></span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Show all the git-notes</h2><a id=\"user-content-show-all-the-git-notes\" class=\"anchor\" aria-label=\"Permalink: Show all the git-notes\" href=\"#show-all-the-git-notes\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git log --show-notes='*'\"><pre>git log --show-notes=<span class=\"pl-s\"><span class=\"pl-pds\">'</span>*<span class=\"pl-pds\">'</span></span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Apply commit from another repository</h2><a id=\"user-content-apply-commit-from-another-repository\" class=\"anchor\" aria-label=\"Permalink: Apply commit from another repository\" href=\"#apply-commit-from-another-repository\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git --git-dir=&lt;source-dir&gt;/.git format-patch -k -1 --stdout &lt;SHA1&gt; | git am -3 -k\"><pre>git --git-dir=<span class=\"pl-k\">&lt;</span>source-dir<span class=\"pl-k\">&gt;</span>/.git format-patch -k -1 --stdout <span class=\"pl-k\">&lt;</span>SHA<span class=\"pl-k\">1&gt;</span> <span class=\"pl-k\">|</span> git am -3 -k</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Specific fetch reference</h2><a id=\"user-content-specific-fetch-reference\" class=\"anchor\" aria-label=\"Permalink: Specific fetch reference\" href=\"#specific-fetch-reference\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git fetch origin master:refs/remotes/origin/mymaster\"><pre>git fetch origin master:refs/remotes/origin/mymaster</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Find common ancestor of two branches</h2><a id=\"user-content-find-common-ancestor-of-two-branches\" class=\"anchor\" aria-label=\"Permalink: Find common ancestor of two branches\" href=\"#find-common-ancestor-of-two-branches\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git merge-base &lt;branch-name&gt; &lt;other-branch-name&gt;\"><pre>git merge-base <span class=\"pl-k\">&lt;</span>branch-name<span class=\"pl-k\">&gt;</span> <span class=\"pl-k\">&lt;</span>other-branch-name<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">List unpushed git commits</h2><a id=\"user-content-list-unpushed-git-commits\" class=\"anchor\" aria-label=\"Permalink: List unpushed git commits\" href=\"#list-unpushed-git-commits\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git log --branches --not --remotes\"><pre>git log --branches --not --remotes</pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git log @{u}..\"><pre>git log @{u}..</pre></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git cherry -v\"><pre>git cherry -v</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Add everything, but whitespace changes</h2><a id=\"user-content-add-everything-but-whitespace-changes\" class=\"anchor\" aria-label=\"Permalink: Add everything, but whitespace changes\" href=\"#add-everything-but-whitespace-changes\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git diff --ignore-all-space | git apply --cached\"><pre>git diff --ignore-all-space <span class=\"pl-k\">|</span> git apply --cached</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Edit [local/global] git config</h2><a id=\"user-content-edit-localglobal-git-config\" class=\"anchor\" aria-label=\"Permalink: Edit [local/global] git config\" href=\"#edit-localglobal-git-config\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git config [--global] --edit\"><pre>git config [--global] --edit</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">blame on certain range</h2><a id=\"user-content-blame-on-certain-range\" class=\"anchor\" aria-label=\"Permalink: blame on certain range\" href=\"#blame-on-certain-range\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git blame -L &lt;start&gt;,&lt;end&gt;\"><pre>git blame -L <span class=\"pl-k\">&lt;</span>start<span class=\"pl-k\">&gt;</span>,<span class=\"pl-k\">&lt;</span>end<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Show a Git logical variable.</h2><a id=\"user-content-show-a-git-logical-variable\" class=\"anchor\" aria-label=\"Permalink: Show a Git logical variable.\" href=\"#show-a-git-logical-variable\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git var -l | &lt;variable&gt;\"><pre>git var -l <span class=\"pl-k\">|</span> <span class=\"pl-k\">&lt;</span>variable<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Preformatted patch file.</h2><a id=\"user-content-preformatted-patch-file\" class=\"anchor\" aria-label=\"Permalink: Preformatted patch file.\" href=\"#preformatted-patch-file\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git format-patch -M upstream..topic\"><pre>git format-patch -M upstream..topic</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Get the repo name.</h2><a id=\"user-content-get-the-repo-name\" class=\"anchor\" aria-label=\"Permalink: Get the repo name.\" href=\"#get-the-repo-name\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git rev-parse --show-toplevel\"><pre>git rev-parse --show-toplevel</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">logs between date range</h2><a id=\"user-content-logs-between-date-range\" class=\"anchor\" aria-label=\"Permalink: logs between date range\" href=\"#logs-between-date-range\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git log --since='FEB 1 2017' --until='FEB 14 2017'\"><pre>git log --since=<span class=\"pl-s\"><span class=\"pl-pds\">'</span>FEB 1 2017<span class=\"pl-pds\">'</span></span> --until=<span class=\"pl-s\"><span class=\"pl-pds\">'</span>FEB 14 2017<span class=\"pl-pds\">'</span></span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Exclude author from logs</h2><a id=\"user-content-exclude-author-from-logs\" class=\"anchor\" aria-label=\"Permalink: Exclude author from logs\" href=\"#exclude-author-from-logs\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git log --perl-regexp --author='^((?!excluded-author-regex).*)\n\"><pre>git log --perl-regexp --author=<span class=\"pl-s\"><span class=\"pl-pds\">'</span>^((?!excluded-author-regex).*)</span>\n<span class=\"pl-s\"></span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Generates a summary of pending changes</h2><a id=\"user-content-generates-a-summary-of-pending-changes\" class=\"anchor\" aria-label=\"Permalink: Generates a summary of pending changes\" href=\"#generates-a-summary-of-pending-changes\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git request-pull v1.0 https://git.ko.xz/project master:for-linus\"><pre>git request-pull v1.0 https://git.ko.xz/project master:for-linus</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">List references in a remote repository</h2><a id=\"user-content-list-references-in-a-remote-repository\" class=\"anchor\" aria-label=\"Permalink: List references in a remote repository\" href=\"#list-references-in-a-remote-repository\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git ls-remote git://git.kernel.org/pub/scm/git/git.git\"><pre>git ls-remote git://git.kernel.org/pub/scm/git/git.git</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Backup untracked files.</h2><a id=\"user-content-backup-untracked-files\" class=\"anchor\" aria-label=\"Permalink: Backup untracked files.\" href=\"#backup-untracked-files\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git ls-files --others -i --exclude-standard | xargs zip untracked.zip\"><pre>git ls-files --others -i --exclude-standard <span class=\"pl-k\">|</span> xargs zip untracked.zip</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">List all git aliases</h2><a id=\"user-content-list-all-git-aliases\" class=\"anchor\" aria-label=\"Permalink: List all git aliases\" href=\"#list-all-git-aliases\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git config -l | grep alias | sed 's/^alias\\.//g'\"><pre>git config -l <span class=\"pl-k\">|</span> grep <span class=\"pl-c1\">alias</span> <span class=\"pl-k\">|</span> sed <span class=\"pl-s\"><span class=\"pl-pds\">'</span>s/^alias\\.//g<span class=\"pl-pds\">'</span></span></pre></div>\n<p dir=\"auto\"><strong>Alternatives:</strong></p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git config -l | grep alias | cut -d '.' -f 2\"><pre>git config -l <span class=\"pl-k\">|</span> grep <span class=\"pl-c1\">alias</span> <span class=\"pl-k\">|</span> cut -d <span class=\"pl-s\"><span class=\"pl-pds\">'</span>.<span class=\"pl-pds\">'</span></span> -f 2</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Show git status short</h2><a id=\"user-content-show-git-status-short\" class=\"anchor\" aria-label=\"Permalink: Show git status short\" href=\"#show-git-status-short\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git status --short --branch\"><pre>git status --short --branch</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Checkout a commit prior to a day ago</h2><a id=\"user-content-checkout-a-commit-prior-to-a-day-ago\" class=\"anchor\" aria-label=\"Permalink: Checkout a commit prior to a day ago\" href=\"#checkout-a-commit-prior-to-a-day-ago\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git checkout master@{yesterday}\"><pre>git checkout master@{yesterday}</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Push the current branch to the same name on the remote repository</h2><a id=\"user-content-push-the-current-branch-to-the-same-name-on-the-remote-repository\" class=\"anchor\" aria-label=\"Permalink: Push the current branch to the same name on the remote repository\" href=\"#push-the-current-branch-to-the-same-name-on-the-remote-repository\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git push origin HEAD\"><pre>git push origin HEAD</pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Push a new local branch to remote repository and track</h2><a id=\"user-content-push-a-new-local-branch-to-remote-repository-and-track\" class=\"anchor\" aria-label=\"Permalink: Push a new local branch to remote repository and track\" href=\"#push-a-new-local-branch-to-remote-repository-and-track\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git push -u origin &lt;branch_name&gt;\"><pre>git push -u origin <span class=\"pl-k\">&lt;</span>branch_name<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Change a branch base</h2><a id=\"user-content-change-a-branch-base\" class=\"anchor\" aria-label=\"Permalink: Change a branch base\" href=\"#change-a-branch-base\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git rebase --onto &lt;new_base&gt; &lt;old_base&gt;\"><pre>git rebase --onto <span class=\"pl-k\">&lt;</span>new_base<span class=\"pl-k\">&gt;</span> <span class=\"pl-k\">&lt;</span>old_base<span class=\"pl-k\">&gt;</span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Use SSH instead of HTTPs for remotes</h2><a id=\"user-content-use-ssh-instead-of-https-for-remotes\" class=\"anchor\" aria-label=\"Permalink: Use SSH instead of HTTPs for remotes\" href=\"#use-ssh-instead-of-https-for-remotes\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git config --global url.'[email protected]:'.insteadOf 'https://github.com/'\"><pre>git config --global url.<span class=\"pl-s\"><span class=\"pl-pds\">'</span>[email protected]:<span class=\"pl-pds\">'</span></span>.insteadOf <span class=\"pl-s\"><span class=\"pl-pds\">'</span>https://github.com/<span class=\"pl-pds\">'</span></span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Update a submodule to the latest commit</h2><a id=\"user-content-update-a-submodule-to-the-latest-commit\" class=\"anchor\" aria-label=\"Permalink: Update a submodule to the latest commit\" href=\"#update-a-submodule-to-the-latest-commit\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"cd &lt;path-to-submodule&gt;\ngit pull origin &lt;branch&gt;\ncd &lt;root-of-your-main-project&gt;\ngit add &lt;path-to-submodule&gt;\ngit commit -m &quot;submodule updated&quot;\"><pre><span class=\"pl-c1\">cd</span> <span class=\"pl-k\">&lt;</span>path-to-submodule<span class=\"pl-k\">&gt;</span>\ngit pull origin <span class=\"pl-k\">&lt;</span>branch<span class=\"pl-k\">&gt;</span>\n<span class=\"pl-c1\">cd</span> <span class=\"pl-k\">&lt;</span>root-of-your-main-project<span class=\"pl-k\">&gt;</span>\ngit add <span class=\"pl-k\">&lt;</span>path-to-submodule<span class=\"pl-k\">&gt;</span>\ngit commit -m <span class=\"pl-s\"><span class=\"pl-pds\">\"</span>submodule updated<span class=\"pl-pds\">\"</span></span></pre></div>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Prevent auto replacing LF with CRLF</h2><a id=\"user-content-prevent-auto-replacing-lf-with-crlf\" class=\"anchor\" aria-label=\"Permalink: Prevent auto replacing LF with CRLF\" href=\"#prevent-auto-replacing-lf-with-crlf\"><svg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"></path></svg></a></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git config --global core.autocrlf false\"><pre>git config --global core.autocrlf <span class=\"pl-c1\">false</span></pre></div>\n\n\n</article>",
"loaded": true,
"timedOut": false,
"errorMessage": null,
"headerInfo": {
"toc": [
{
"level": 2,
"text": "git-tips",
"anchor": "git-tips",
"htmlText": "git-tips"
},
{
"level": 3,
"text": "Tools:",
"anchor": "tools",
"htmlText": "Tools:"
},
{
"level": 2,
"text": "Everyday Git in twenty commands or so",
"anchor": "everyday-git-in-twenty-commands-or-so",
"htmlText": "Everyday Git in twenty commands or so"
},
{
"level": 2,
"text": "Show helpful guides that come with Git",
"anchor": "show-helpful-guides-that-come-with-git",
"htmlText": "Show helpful guides that come with Git"
},
{
"level": 2,
"text": "Search change by content",
"anchor": "search-change-by-content",
"htmlText": "Search change by content"
},
{
"level": 2,
"text": "Show changes over time for specific file",
"anchor": "show-changes-over-time-for-specific-file",
"htmlText": "Show changes over time for specific file"
},
{
"level": 2,
"text": "Remove sensitive data from history, after a push",
"anchor": "remove-sensitive-data-from-history-after-a-push",
"htmlText": "Remove sensitive data from history, after a push"
},
{
"level": 2,
"text": "Sync with remote, overwrite local changes",
"anchor": "sync-with-remote-overwrite-local-changes",
"htmlText": "Sync with remote, overwrite local changes"
},
{
"level": 2,
"text": "List of all files till a commit",
"anchor": "list-of-all-files-till-a-commit",
"htmlText": "List of all files till a commit"
},
{
"level": 2,
"text": "Git reset first commit",
"anchor": "git-reset-first-commit",
"htmlText": "Git reset first commit"
},
{
"level": 2,
"text": "Reset: preserve uncommitted local changes",
"anchor": "reset-preserve-uncommitted-local-changes",
"htmlText": "Reset: preserve uncommitted local changes"
},
{
"level": 2,
"text": "List all the conflicted files",
"anchor": "list-all-the-conflicted-files",
"htmlText": "List all the conflicted files"
},
{
"level": 2,
"text": "List of all files changed in a commit",
"anchor": "list-of-all-files-changed-in-a-commit",
"htmlText": "List of all files changed in a commit"
},
{
"level": 2,
"text": "Unstaged changes since last commit",
"anchor": "unstaged-changes-since-last-commit",
"htmlText": "Unstaged changes since last commit"
},
{
"level": 2,
"text": "Changes staged for commit",
"anchor": "changes-staged-for-commit",
"htmlText": "Changes staged for commit"
},
{
"level": 2,
"text": "Show both staged and unstaged changes",
"anchor": "show-both-staged-and-unstaged-changes",
"htmlText": "Show both staged and unstaged changes"
},
{
"level": 2,
"text": "List all branches that are already merged into master",
"anchor": "list-all-branches-that-are-already-merged-into-master",
"htmlText": "List all branches that are already merged into master"
},
{
"level": 2,
"text": "Quickly switch to the previous branch",
"anchor": "quickly-switch-to-the-previous-branch",
"htmlText": "Quickly switch to the previous branch"
},
{
"level": 2,
"text": "Remove branches that have already been merged with master",
"anchor": "remove-branches-that-have-already-been-merged-with-master",
"htmlText": "Remove branches that have already been merged with master"
},
{
"level": 2,
"text": "List all branches and their upstreams, as well as last commit on branch",
"anchor": "list-all-branches-and-their-upstreams-as-well-as-last-commit-on-branch",
"htmlText": "List all branches and their upstreams, as well as last commit on branch"
},
{
"level": 2,
"text": "Track upstream branch",
"anchor": "track-upstream-branch",
"htmlText": "Track upstream branch"
},
{
"level": 2,
"text": "Delete local branch",
"anchor": "delete-local-branch",
"htmlText": "Delete local branch"
},
{
"level": 2,
"text": "Delete remote branch",
"anchor": "delete-remote-branch",
"htmlText": "Delete remote branch"
},
{
"level": 2,
"text": "Create local tag",
"anchor": "create-local-tag",
"htmlText": "Create local tag"
},
{
"level": 2,
"text": "Delete local tag",
"anchor": "delete-local-tag",
"htmlText": "Delete local tag"
},
{
"level": 2,
"text": "Delete remote tag",
"anchor": "delete-remote-tag",
"htmlText": "Delete remote tag"
},
{
"level": 2,
"text": "Undo local changes with the content in index(staging)",
"anchor": "undo-local-changes-with-the-content-in-indexstaging",
"htmlText": "Undo local changes with the content in index(staging)"
},
{
"level": 2,
"text": "Revert: Undo a commit by creating a new commit",
"anchor": "revert-undo-a-commit-by-creating-a-new-commit",
"htmlText": "Revert: Undo a commit by creating a new commit"
},
{
"level": 2,
"text": "Reset: Discard commits, advised for private branch",
"anchor": "reset-discard-commits-advised-for-private-branch",
"htmlText": "Reset: Discard commits, advised for private branch"
},
{
"level": 2,
"text": "Reword the previous commit message",
"anchor": "reword-the-previous-commit-message",
"htmlText": "Reword the previous commit message"
},
{
"level": 2,
"text": "See commit history for just the current branch",
"anchor": "see-commit-history-for-just-the-current-branch",
"htmlText": "See commit history for just the current branch"
},
{
"level": 2,
"text": "Amend author.",
"anchor": "amend-author",
"htmlText": "Amend author."
},
{
"level": 2,
"text": "Reset author, after author has been changed in the global config.",
"anchor": "reset-author-after-author-has-been-changed-in-the-global-config",
"htmlText": "Reset author, after author has been changed in the global config."
},
{
"level": 2,
"text": "Changing a remote's URL",
"anchor": "changing-a-remotes-url",
"htmlText": "Changing a remote's URL"
},
{
"level": 2,
"text": "Get list of all remote references",
"anchor": "get-list-of-all-remote-references",
"htmlText": "Get list of all remote references"
},
{
"level": 2,
"text": "Get list of all local and remote branches",
"anchor": "get-list-of-all-local-and-remote-branches",
"htmlText": "Get list of all local and remote branches"
},
{
"level": 2,
"text": "Get only remote branches",
"anchor": "get-only-remote-branches",
"htmlText": "Get only remote branches"
},
{
"level": 2,
"text": "Stage parts of a changed file, instead of the entire file",
"anchor": "stage-parts-of-a-changed-file-instead-of-the-entire-file",
"htmlText": "Stage parts of a changed file, instead of the entire file"
},
{
"level": 2,
"text": "Get git bash completion",
"anchor": "get-git-bash-completion",
"htmlText": "Get git bash completion"
},
{
"level": 2,
"text": "What changed since two weeks?",
"anchor": "what-changed-since-two-weeks",
"htmlText": "What changed since two weeks?"
},
{
"level": 2,
"text": "See all commits made since forking from master",
"anchor": "see-all-commits-made-since-forking-from-master",
"htmlText": "See all commits made since forking from master"
},
{
"level": 2,
"text": "Pick commits across branches using cherry-pick",
"anchor": "pick-commits-across-branches-using-cherry-pick",
"htmlText": "Pick commits across branches using cherry-pick"
},
{
"level": 2,
"text": "Find out branches containing commit-hash",
"anchor": "find-out-branches-containing-commit-hash",
"htmlText": "Find out branches containing commit-hash"
},
{
"level": 2,
"text": "Git Aliases",
"anchor": "git-aliases",
"htmlText": "Git Aliases"
},
{
"level": 2,
"text": "Saving current state of tracked files without commiting",
"anchor": "saving-current-state-of-tracked-files-without-commiting",
"htmlText": "Saving current state of tracked files without commiting"
},
{
"level": 2,
"text": "Saving current state of unstaged changes to tracked files",
"anchor": "saving-current-state-of-unstaged-changes-to-tracked-files",
"htmlText": "Saving current state of unstaged changes to tracked files"
},
{
"level": 2,
"text": "Saving current state including untracked files",
"anchor": "saving-current-state-including-untracked-files",
"htmlText": "Saving current state including untracked files"
},
{
"level": 2,
"text": "Saving current state with message",
"anchor": "saving-current-state-with-message",
"htmlText": "Saving current state with message"
},
{
"level": 2,
"text": "Saving current state of all files (ignored, untracked, and tracked)",
"anchor": "saving-current-state-of-all-files-ignored-untracked-and-tracked",
"htmlText": "Saving current state of all files (ignored, untracked, and tracked)"
},
{
"level": 2,
"text": "Show list of all saved stashes",
"anchor": "show-list-of-all-saved-stashes",
"htmlText": "Show list of all saved stashes"
},
{
"level": 2,
"text": "Show the contents of any stash in patch form",
"anchor": "show-the-contents-of-any-stash-in-patch-form",
"htmlText": "Show the contents of any stash in patch form"
},
{
"level": 2,
"text": "Apply any stash without deleting from the stashed list",
"anchor": "apply-any-stash-without-deleting-from-the-stashed-list",
"htmlText": "Apply any stash without deleting from the stashed list"
},
{
"level": 2,
"text": "Apply last stashed state and delete it from stashed list",
"anchor": "apply-last-stashed-state-and-delete-it-from-stashed-list",
"htmlText": "Apply last stashed state and delete it from stashed list"
},
{
"level": 2,
"text": "Delete all stored stashes",
"anchor": "delete-all-stored-stashes",
"htmlText": "Delete all stored stashes"
},
{
"level": 2,
"text": "Grab a single file from a stash",
"anchor": "grab-a-single-file-from-a-stash",
"htmlText": "Grab a single file from a stash"
},
{
"level": 2,
"text": "Show all tracked files",
"anchor": "show-all-tracked-files",
"htmlText": "Show all tracked files"
},
{
"level": 2,
"text": "Show all untracked files",
"anchor": "show-all-untracked-files",
"htmlText": "Show all untracked files"
},
{
"level": 2,
"text": "Show all ignored files",
"anchor": "show-all-ignored-files",
"htmlText": "Show all ignored files"
},
{
"level": 2,
"text": "Create new working tree from a repository (git 2.5)",
"anchor": "create-new-working-tree-from-a-repository-git-25",
"htmlText": "Create new working tree from a repository (git 2.5)"
},
{
"level": 2,
"text": "Create new working tree from HEAD state",
"anchor": "create-new-working-tree-from-head-state",
"htmlText": "Create new working tree from HEAD state"
},
{
"level": 2,
"text": "Untrack files without deleting",
"anchor": "untrack-files-without-deleting",
"htmlText": "Untrack files without deleting"
},
{
"level": 2,
"text": "Before deleting untracked files/directory, do a dry run to get the list of these files/directories",
"anchor": "before-deleting-untracked-filesdirectory-do-a-dry-run-to-get-the-list-of-these-filesdirectories",
"htmlText": "Before deleting untracked files/directory, do a dry run to get the list of these files/directories"
},
{
"level": 2,
"text": "Forcefully remove untracked files",
"anchor": "forcefully-remove-untracked-files",
"htmlText": "Forcefully remove untracked files"
},
{
"level": 2,
"text": "Forcefully remove untracked directory",
"anchor": "forcefully-remove-untracked-directory",
"htmlText": "Forcefully remove untracked directory"
},
{
"level": 2,
"text": "Update all the submodules",
"anchor": "update-all-the-submodules",
"htmlText": "Update all the submodules"
},
{
"level": 2,
"text": "Show all commits in the current branch yet to be merged to master",
"anchor": "show-all-commits-in-the-current-branch-yet-to-be-merged-to-master",
"htmlText": "Show all commits in the current branch yet to be merged to master"
},
{
"level": 2,
"text": "Rename a branch",
"anchor": "rename-a-branch",
"htmlText": "Rename a branch"
},
{
"level": 2,
"text": "Rebases 'feature' to 'master' and merges it in to master",
"anchor": "rebases-feature-to-master-and-merges-it-in-to-master",
"htmlText": "Rebases 'feature' to 'master' and merges it in to master"
},
{
"level": 2,
"text": "Archive the master branch",
"anchor": "archive-the-master-branch",
"htmlText": "Archive the master branch"
},
{
"level": 2,
"text": "Modify previous commit without modifying the commit message",
"anchor": "modify-previous-commit-without-modifying-the-commit-message",
"htmlText": "Modify previous commit without modifying the commit message"
},
{
"level": 2,
"text": "Prunes references to remove branches that have been deleted in the remote.",
"anchor": "prunes-references-to-remove-branches-that-have-been-deleted-in-the-remote",
"htmlText": "Prunes references to remove branches that have been deleted in the remote."
},
{
"level": 2,
"text": "Delete local branches that has been squash and merged in the remote.",
"anchor": "delete-local-branches-that-has-been-squash-and-merged-in-the-remote",
"htmlText": "Delete local branches that has been squash and merged in the remote."
},
{
"level": 2,
"text": "Retrieve the commit hash of the initial revision.",
"anchor": "retrieve-the-commit-hash-of-the-initial-revision",
"htmlText": "Retrieve the commit hash of the initial revision."
},
{
"level": 2,
"text": "Visualize the version tree.",
"anchor": "visualize-the-version-tree",
"htmlText": "Visualize the version tree."
},
{
"level": 2,
"text": "Visualize the tree including commits that are only referenced from reflogs",
"anchor": "visualize-the-tree-including-commits-that-are-only-referenced-from-reflogs",
"htmlText": "Visualize the tree including commits that are only referenced from reflogs"
},
{
"level": 2,
"text": "Deploying git tracked subfolder to gh-pages",
"anchor": "deploying-git-tracked-subfolder-to-gh-pages",
"htmlText": "Deploying git tracked subfolder to gh-pages"
},
{
"level": 2,
"text": "Adding a project to repo using subtree",
"anchor": "adding-a-project-to-repo-using-subtree",
"htmlText": "Adding a project to repo using subtree"
},
{
"level": 2,
"text": "Get latest changes in your repo for a linked project using subtree",
"anchor": "get-latest-changes-in-your-repo-for-a-linked-project-using-subtree",
"htmlText": "Get latest changes in your repo for a linked project using subtree"
},
{
"level": 2,
"text": "Export a branch with history to a file.",
"anchor": "export-a-branch-with-history-to-a-file",
"htmlText": "Export a branch with history to a file."
},
{
"level": 2,
"text": "Import from a bundle",
"anchor": "import-from-a-bundle",
"htmlText": "Import from a bundle"
},
{
"level": 2,
"text": "Get the name of current branch.",
"anchor": "get-the-name-of-current-branch",
"htmlText": "Get the name of current branch."
},
{
"level": 2,
"text": "Ignore one file on commit (e.g. Changelog).",
"anchor": "ignore-one-file-on-commit-eg-changelog",
"htmlText": "Ignore one file on commit (e.g. Changelog)."
},
{
"level": 2,
"text": "Stash changes before rebasing",
"anchor": "stash-changes-before-rebasing",
"htmlText": "Stash changes before rebasing"
},
{
"level": 2,
"text": "Fetch pull request by ID to a local branch",
"anchor": "fetch-pull-request-by-id-to-a-local-branch",
"htmlText": "Fetch pull request by ID to a local branch"
},
{
"level": 2,
"text": "Show the most recent tag on the current branch.",
"anchor": "show-the-most-recent-tag-on-the-current-branch",
"htmlText": "Show the most recent tag on the current branch."
},
{
"level": 2,
"text": "Show inline word diff.",
"anchor": "show-inline-word-diff",
"htmlText": "Show inline word diff."
},
{
"level": 2,
"text": "Show changes using common diff tools.",
"anchor": "show-changes-using-common-diff-tools",
"htmlText": "Show changes using common diff tools."
},
{
"level": 2,
"text": "Don’t consider changes for tracked file.",
"anchor": "dont-consider-changes-for-tracked-file",
"htmlText": "Don’t consider changes for tracked file."
},
{
"level": 2,
"text": "Undo assume-unchanged.",
"anchor": "undo-assume-unchanged",
"htmlText": "Undo assume-unchanged."
},
{
"level": 2,
"text": "Clean the files from .gitignore.",
"anchor": "clean-the-files-from-gitignore",
"htmlText": "Clean the files from .gitignore."
},
{
"level": 2,
"text": "Restore deleted file.",
"anchor": "restore-deleted-file",
"htmlText": "Restore deleted file."
},
{
"level": 2,
"text": "Restore file to a specific commit-hash",
"anchor": "restore-file-to-a-specific-commit-hash",
"htmlText": "Restore file to a specific commit-hash"
},
{
"level": 2,
"text": "Always rebase instead of merge on pull.",
"anchor": "always-rebase-instead-of-merge-on-pull",
"htmlText": "Always rebase instead of merge on pull."
},
{
"level": 2,
"text": "List all the alias and configs.",
"anchor": "list-all-the-alias-and-configs",
"htmlText": "List all the alias and configs."
},
{
"level": 2,
"text": "Make git case sensitive.",
"anchor": "make-git-case-sensitive",
"htmlText": "Make git case sensitive."
},
{
"level": 2,
"text": "Add custom editors.",
"anchor": "add-custom-editors",
"htmlText": "Add custom editors."
},
{
"level": 2,
"text": "Auto correct typos.",
"anchor": "auto-correct-typos",
"htmlText": "Auto correct typos."
},
{
"level": 2,
"text": "Check if the change was a part of a release.",
"anchor": "check-if-the-change-was-a-part-of-a-release",
"htmlText": "Check if the change was a part of a release."
},
{
"level": 2,
"text": "Dry run. (any command that supports dry-run flag should do.)",
"anchor": "dry-run-any-command-that-supports-dry-run-flag-should-do",
"htmlText": "Dry run. (any command that supports dry-run flag should do.)"
},
{
"level": 2,
"text": "Marks your commit as a fix of a previous commit.",
"anchor": "marks-your-commit-as-a-fix-of-a-previous-commit",
"htmlText": "Marks your commit as a fix of a previous commit."
},
{
"level": 2,
"text": "Squash fixup commits normal commits.",
"anchor": "squash-fixup-commits-normal-commits",
"htmlText": "Squash fixup commits normal commits."
},
{
"level": 2,
"text": "Skip staging area during commit.",
"anchor": "skip-staging-area-during-commit",
"htmlText": "Skip staging area during commit."
},
{
"level": 2,
"text": "Interactive staging.",
"anchor": "interactive-staging",
"htmlText": "Interactive staging."
},
{
"level": 2,
"text": "List ignored files.",
"anchor": "list-ignored-files",
"htmlText": "List ignored files."
},
{
"level": 2,
"text": "Status of ignored files.",
"anchor": "status-of-ignored-files",
"htmlText": "Status of ignored files."
},
{
"level": 2,
"text": "Commits in Branch1 that are not in Branch2",
"anchor": "commits-in-branch1-that-are-not-in-branch2",
"htmlText": "Commits in Branch1 that are not in Branch2"
},
{
"level": 2,
"text": "List n last commits",
"anchor": "list-n-last-commits",
"htmlText": "List n last commits"
},
{
"level": 2,
"text": "Reuse recorded resolution, record and reuse previous conflicts resolutions.",
"anchor": "reuse-recorded-resolution-record-and-reuse-previous-conflicts-resolutions",
"htmlText": "Reuse recorded resolution, record and reuse previous conflicts resolutions."
},
{
"level": 2,
"text": "Open all conflicted files in an editor.",
"anchor": "open-all-conflicted-files-in-an-editor",
"htmlText": "Open all conflicted files in an editor."
},
{
"level": 2,
"text": "Count unpacked number of objects and their disk consumption.",
"anchor": "count-unpacked-number-of-objects-and-their-disk-consumption",
"htmlText": "Count unpacked number of objects and their disk consumption."
},
{
"level": 2,
"text": "Prune all unreachable objects from the object database.",
"anchor": "prune-all-unreachable-objects-from-the-object-database",
"htmlText": "Prune all unreachable objects from the object database."
},
{
"level": 2,
"text": "Instantly browse your working repository in gitweb.",
"anchor": "instantly-browse-your-working-repository-in-gitweb",
"htmlText": "Instantly browse your working repository in gitweb."
},
{
"level": 2,
"text": "View the GPG signatures in the commit log",
"anchor": "view-the-gpg-signatures-in-the-commit-log",
"htmlText": "View the GPG signatures in the commit log"
},
{
"level": 2,
"text": "Remove entry in the global config.",
"anchor": "remove-entry-in-the-global-config",
"htmlText": "Remove entry in the global config."
},
{
"level": 2,
"text": "Checkout a new branch without any history",
"anchor": "checkout-a-new-branch-without-any-history",
"htmlText": "Checkout a new branch without any history"
},
{
"level": 2,
"text": "Extract file from another branch.",
"anchor": "extract-file-from-another-branch",
"htmlText": "Extract file from another branch."
},
{
"level": 2,
"text": "List only the root and merge commits.",
"anchor": "list-only-the-root-and-merge-commits",
"htmlText": "List only the root and merge commits."
},
{
"level": 2,
"text": "Change previous two commits with an interactive rebase.",
"anchor": "change-previous-two-commits-with-an-interactive-rebase",
"htmlText": "Change previous two commits with an interactive rebase."
},
{
"level": 2,
"text": "List all branch is WIP",
"anchor": "list-all-branch-is-wip",
"htmlText": "List all branch is WIP"
},
{
"level": 2,
"text": "Find guilty with binary search",
"anchor": "find-guilty-with-binary-search",
"htmlText": "Find guilty with binary search"
},
{
"level": 2,
"text": "Bypass pre-commit and commit-msg githooks",
"anchor": "bypass-pre-commit-and-commit-msg-githooks",
"htmlText": "Bypass pre-commit and commit-msg githooks"
},
{
"level": 2,
"text": "List commits and changes to a specific file (even through renaming)",
"anchor": "list-commits-and-changes-to-a-specific-file-even-through-renaming",
"htmlText": "List commits and changes to a specific file (even through renaming)"
},
{
"level": 2,
"text": "Clone a single branch",
"anchor": "clone-a-single-branch",
"htmlText": "Clone a single branch"
},
{
"level": 2,
"text": "Create and switch new branch",
"anchor": "create-and-switch-new-branch",
"htmlText": "Create and switch new branch"
},
{
"level": 2,
"text": "Ignore file mode changes on commits",
"anchor": "ignore-file-mode-changes-on-commits",
"htmlText": "Ignore file mode changes on commits"
},
{
"level": 2,
"text": "Turn off git colored terminal output",
"anchor": "turn-off-git-colored-terminal-output",
"htmlText": "Turn off git colored terminal output"
},
{
"level": 2,
"text": "Specific color settings",
"anchor": "specific-color-settings",
"htmlText": "Specific color settings"
},
{
"level": 2,
"text": "Show all local branches ordered by recent commits",
"anchor": "show-all-local-branches-ordered-by-recent-commits",
"htmlText": "Show all local branches ordered by recent commits"
},
{
"level": 2,
"text": "Find lines matching the pattern (regex or string) in tracked files",
"anchor": "find-lines-matching-the-pattern-regex-or-string-in-tracked-files",
"htmlText": "Find lines matching the pattern (regex or string) in tracked files"
},
{
"level": 2,
"text": "Clone a shallow copy of a repository",
"anchor": "clone-a-shallow-copy-of-a-repository",
"htmlText": "Clone a shallow copy of a repository"
},
{
"level": 2,
"text": "Search Commit log across all branches for given text",
"anchor": "search-commit-log-across-all-branches-for-given-text",
"htmlText": "Search Commit log across all branches for given text"
},
{
"level": 2,
"text": "Get first commit in a branch (from master)",
"anchor": "get-first-commit-in-a-branch-from-master",
"htmlText": "Get first commit in a branch (from master)"
},
{
"level": 2,
"text": "Unstaging Staged file",
"anchor": "unstaging-staged-file",
"htmlText": "Unstaging Staged file"
},
{
"level": 2,
"text": "Force push to Remote Repository",
"anchor": "force-push-to-remote-repository",
"htmlText": "Force push to Remote Repository"
},
{
"level": 2,
"text": "Adding Remote name",
"anchor": "adding-remote-name",
"htmlText": "Adding Remote name"
},
{
"level": 2,
"text": "List all currently configured remotes",
"anchor": "list-all-currently-configured-remotes",
"htmlText": "List all currently configured remotes"
},
{
"level": 2,
"text": "Show the author, time and last revision made to each line of a given file",
"anchor": "show-the-author-time-and-last-revision-made-to-each-line-of-a-given-file",
"htmlText": "Show the author, time and last revision made to each line of a given file"
},
{
"level": 2,
"text": "Group commits by authors and title",
"anchor": "group-commits-by-authors-and-title",
"htmlText": "Group commits by authors and title"
},
{
"level": 2,
"text": "Forced push but still ensure you don't overwrite other's work",
"anchor": "forced-push-but-still-ensure-you-dont-overwrite-others-work",
"htmlText": "Forced push but still ensure you don't overwrite other's work"
},
{
"level": 2,
"text": "Show how many lines does an author contribute",
"anchor": "show-how-many-lines-does-an-author-contribute",
"htmlText": "Show how many lines does an author contribute"
},
{
"level": 2,
"text": "Revert: Reverting an entire merge",
"anchor": "revert-reverting-an-entire-merge",
"htmlText": "Revert: Reverting an entire merge"
},
{
"level": 2,
"text": "Number of commits in a branch",
"anchor": "number-of-commits-in-a-branch",
"htmlText": "Number of commits in a branch"
},
{
"level": 2,
"text": "Alias: git undo",
"anchor": "alias-git-undo",
"htmlText": "Alias: git undo"
},
{
"level": 2,
"text": "Add object notes",
"anchor": "add-object-notes",
"htmlText": "Add object notes"
},
{
"level": 2,
"text": "Show all the git-notes",
"anchor": "show-all-the-git-notes",
"htmlText": "Show all the git-notes"
},
{
"level": 2,
"text": "Apply commit from another repository",
"anchor": "apply-commit-from-another-repository",
"htmlText": "Apply commit from another repository"
},
{
"level": 2,
"text": "Specific fetch reference",
"anchor": "specific-fetch-reference",
"htmlText": "Specific fetch reference"
},
{
"level": 2,
"text": "Find common ancestor of two branches",
"anchor": "find-common-ancestor-of-two-branches",
"htmlText": "Find common ancestor of two branches"
},
{
"level": 2,
"text": "List unpushed git commits",
"anchor": "list-unpushed-git-commits",
"htmlText": "List unpushed git commits"
},
{
"level": 2,
"text": "Add everything, but whitespace changes",
"anchor": "add-everything-but-whitespace-changes",
"htmlText": "Add everything, but whitespace changes"
},
{
"level": 2,
"text": "Edit [local/global] git config",
"anchor": "edit-localglobal-git-config",
"htmlText": "Edit [local/global] git config"
},
{
"level": 2,
"text": "blame on certain range",
"anchor": "blame-on-certain-range",
"htmlText": "blame on certain range"
},
{
"level": 2,
"text": "Show a Git logical variable.",
"anchor": "show-a-git-logical-variable",
"htmlText": "Show a Git logical variable."
},
{
"level": 2,
"text": "Preformatted patch file.",
"anchor": "preformatted-patch-file",
"htmlText": "Preformatted patch file."
},
{
"level": 2,
"text": "Get the repo name.",
"anchor": "get-the-repo-name",
"htmlText": "Get the repo name."
},
{
"level": 2,
"text": "logs between date range",
"anchor": "logs-between-date-range",
"htmlText": "logs between date range"
},
{
"level": 2,
"text": "Exclude author from logs",
"anchor": "exclude-author-from-logs",
"htmlText": "Exclude author from logs"
},
{
"level": 2,
"text": "Generates a summary of pending changes",
"anchor": "generates-a-summary-of-pending-changes",
"htmlText": "Generates a summary of pending changes"
},
{
"level": 2,
"text": "List references in a remote repository",
"anchor": "list-references-in-a-remote-repository",
"htmlText": "List references in a remote repository"
},
{
"level": 2,
"text": "Backup untracked files.",
"anchor": "backup-untracked-files",
"htmlText": "Backup untracked files."
},
{
"level": 2,
"text": "List all git aliases",
"anchor": "list-all-git-aliases",
"htmlText": "List all git aliases"
},
{
"level": 2,
"text": "Show git status short",
"anchor": "show-git-status-short",
"htmlText": "Show git status short"
},
{
"level": 2,
"text": "Checkout a commit prior to a day ago",
"anchor": "checkout-a-commit-prior-to-a-day-ago",
"htmlText": "Checkout a commit prior to a day ago"
},
{
"level": 2,
"text": "Push the current branch to the same name on the remote repository",
"anchor": "push-the-current-branch-to-the-same-name-on-the-remote-repository",
"htmlText": "Push the current branch to the same name on the remote repository"
},
{
"level": 2,
"text": "Push a new local branch to remote repository and track",
"anchor": "push-a-new-local-branch-to-remote-repository-and-track",
"htmlText": "Push a new local branch to remote repository and track"
},
{
"level": 2,
"text": "Change a branch base",
"anchor": "change-a-branch-base",
"htmlText": "Change a branch base"
},
{
"level": 2,
"text": "Use SSH instead of HTTPs for remotes",
"anchor": "use-ssh-instead-of-https-for-remotes",
"htmlText": "Use SSH instead of HTTPs for remotes"
},
{
"level": 2,
"text": "Update a submodule to the latest commit",
"anchor": "update-a-submodule-to-the-latest-commit",
"htmlText": "Update a submodule to the latest commit"
},
{
"level": 2,
"text": "Prevent auto replacing LF with CRLF",
"anchor": "prevent-auto-replacing-lf-with-crlf",
"htmlText": "Prevent auto replacing LF with CRLF"
}
],
"siteNavLoginPath": "/login?return_to=https%3A%2F%2Fgithub.com%2Fgit-tips%2Ftips"
}
},
{
"displayName": "CODE_OF_CONDUCT.md",
"repoName": "tips",
"refName": "master",
"path": "CODE_OF_CONDUCT.md",
"preferredFileType": "code_of_conduct",
"tabName": "Code of conduct",
"richText": null,
"loaded": false,
"timedOut": false,
"errorMessage": null,
"headerInfo": {
"toc": null,
"siteNavLoginPath": "/login?return_to=https%3A%2F%2Fgithub.com%2Fgit-tips%2Ftips"
}
},
{
"displayName": "LICENSE",
"repoName": "tips",
"refName": "master",
"path": "LICENSE",
"preferredFileType": "license",
"tabName": "MIT",
"richText": null,
"loaded": false,
"timedOut": false,
"errorMessage": null,
"headerInfo": {
"toc": null,
"siteNavLoginPath": "/login?return_to=https%3A%2F%2Fgithub.com%2Fgit-tips%2Ftips"
}
}
],
"overviewFilesProcessingTime": 0
}
},
"appPayload": {
"helpUrl": "https://docs.github.com",
"findFileWorkerPath": "/assets-cdn/worker/find-file-worker-1583894afd38.js",
"findInFileWorkerPath": "/assets-cdn/worker/find-in-file-worker-3a63a487027b.js",
"githubDevUrl": null,
"enabled_features": {
"code_nav_ui_events": false,
"overview_shared_code_dropdown_button": false,
"react_blob_overlay": false,
"copilot_conversational_ux_embedding_update": false,
"copilot_smell_icebreaker_ux": true,
"copilot_workspace": false
}
}
}
}
{
"accept-ranges": "bytes",
"cache-control": "max-age=0, private, must-revalidate",
"content-encoding": "gzip",
"content-security-policy": "default-src 'none'; base-uri 'self'; child-src github.com/assets-cdn/worker/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com api.githubcopilot.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com/v1/engines/github-completion/completions proxy.enterprise.githubcopilot.com/v1/engines/github-completion/completions *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.com/assets-cdn/worker/ gist.github.com/assets-cdn/worker/",
"content-type": "text/html; charset=utf-8",
"date": "Sat, 27 Jul 2024 09:11:14 GMT",
"etag": "fab32d476ff5d379b45c29bcdf34b281",
"referrer-policy": "no-referrer-when-downgrade",
"server": "GitHub.com",
"set-cookie": "logged_in=no; Path=/; Domain=github.com; Expires=Sun, 27 Jul 2025 09:11:14 GMT; HttpOnly; Secure; SameSite=Lax",
"strict-transport-security": "max-age=31536000; includeSubdomains; preload",
"transfer-encoding": "chunked",
"vary": "X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, Accept-Encoding, Accept, X-Requested-With",
"x-content-type-options": "nosniff",
"x-frame-options": "deny",
"x-github-request-id": "CCAA:30D989:32AF393:43A589A:66A4B9B2",
"x-xss-protection": "0"
}