<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Digital Garage — Git Aliases</title>
  <subtitle>Digital Garage git aliases</subtitle>
  <link href="https://www.timhilton.xyz/feeds/git-aliases.xml" rel="self"/>
  <link href="https://www.timhilton.xyz/git-aliases/"/>
  <updated>2026-04-28T00:00:00Z</updated>
  <id>https://www.timhilton.xyz/feeds/git-aliases.xml</id>
  <author>
    <name>Tim Hilton</name>
  </author>
  
  <entry>
    <title>git npmauth</title>
    <link href="https://www.timhilton.xyz/git-aliases/npmauth/"/>
    <id>https://www.timhilton.xyz/git-aliases/npmauth/</id>
    <updated>2026-04-28T00:00:00Z</updated>
    <summary>!f() { root=$(git rev-parse --show-toplevel); first=1; git ls-files &quot;*/.npmrc&quot; | sed &quot;s|/[^/]*$||&quot; | sort -u | while IFS= read -r dir; do echo &quot;Running vsts-npm-auth in $dir&quot; &amp;&amp; cd &quot;$root/$dir&quot; &amp;&amp; if [ &quot;$first&quot; = &quot;1&quot; ]; then vsts-npm-auth -F -config .npmrc; first=0; else vsts-npm-auth -config .npmrc; fi; done; }; f</summary>
    <content type="html">
      <![CDATA[<p>Run <code>vsts-npm-auth -config .npmrc</code> in all directories containing a <code>.npmrc</code> file. Forces new credentials for the first <code>.npmrc</code> found (useful when multiple directories share the same npm registries), then authenticates the remaining directories without forcing. This is helpful in monorepo setups where multiple packages authenticate against the same Azure Artifacts npm registries.</p>
<p>Written with the help of <a href="https://claude.ai/">Claude</a>.</p>
<p><code>git npmauth</code> — <code>!f() { root=$(git rev-parse --show-toplevel); first=1; git ls-files &quot;*/.npmrc&quot; | sed &quot;s|/[^/]*$||&quot; | sort -u | while IFS= read -r dir; do echo &quot;Running vsts-npm-auth in $dir&quot; &amp;&amp; cd &quot;$root/$dir&quot; &amp;&amp; if [ &quot;$first&quot; = &quot;1&quot; ]; then vsts-npm-auth -F -config .npmrc; first=0; else vsts-npm-auth -config .npmrc; fi; done; }; f</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git abort-stash</title>
    <link href="https://www.timhilton.xyz/git-aliases/abort-stash/"/>
    <id>https://www.timhilton.xyz/git-aliases/abort-stash/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>!git reset --merge</summary>
    <content type="html">
      <![CDATA[<p>Scenario: You apply a stash but there's a merge conflict. You want to discard all changes so that you can start from a blank slate.<br>
Note that this will discard staged changes, so only use this if you're prepared to discard everything.</p>
<p><code>git abort-stash</code> — <code>!git reset --merge</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git apply-stash</title>
    <link href="https://www.timhilton.xyz/git-aliases/apply-stash/"/>
    <id>https://www.timhilton.xyz/git-aliases/apply-stash/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>!f() { stash=$(git stash list | grep -i &quot;$1&quot; | head -n 1); if [ -n &quot;$stash&quot; ]; then stash_id=$(echo &quot;$stash&quot; | awk -F: &#39;{print $1}&#39;); echo &quot;Applying $stash&quot;; git stash apply &quot;$stash_id&quot;; else echo &quot;No stash found matching: $1&quot;; fi; }; f</summary>
    <content type="html">
      <![CDATA[<p>Apply a stash by searching for a partial match in the stash message. Instead of remembering stash numbers, you can use part of the stash description to apply the correct stash. For example, <code>git apply-stash config</code> will apply the most recent stash with &quot;config&quot; in its message.</p>
<p><code>git apply-stash</code> — <code>!f() { stash=$(git stash list | grep -i &quot;$1&quot; | head -n 1); if [ -n &quot;$stash&quot; ]; then stash_id=$(echo &quot;$stash&quot; | awk -F: &#39;{print $1}&#39;); echo &quot;Applying $stash&quot;; git stash apply &quot;$stash_id&quot;; else echo &quot;No stash found matching: $1&quot;; fi; }; f</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git stash-config</title>
    <link href="https://www.timhilton.xyz/git-aliases/stash-config/"/>
    <id>https://www.timhilton.xyz/git-aliases/stash-config/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>!f() { git stash -u -m &quot;$1 config $(date +%Y-%m-%d&#39; &#39;%H:%M)&quot;; }; f</summary>
    <content type="html">
      <![CDATA[<p>Stash current changes, suffixing the provided message with the word 'config' and the current date &amp; time.</p>
<p>For example, running <code>git stash-config &quot;MyApp working&quot;</code> could create a stash called <code>MyApp working config 2025-12-04 09:37</code>.</p>
<p><code>git stash-config</code> — <code>!f() { git stash -u -m &quot;$1 config $(date +%Y-%m-%d&#39; &#39;%H:%M)&quot;; }; f</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git cdp</title>
    <link href="https://www.timhilton.xyz/git-aliases/cdp/"/>
    <id>https://www.timhilton.xyz/git-aliases/cdp/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>!git checkout dev &amp;&amp; git pull</summary>
    <content type="html">
      <![CDATA[<p>Checkout the <code>dev</code> branch and pull the latest changes from the remote. This is a quick way to switch to your main development branch and ensure you have the latest code before starting new work or reviewing changes.</p>
<p><code>git cdp</code> — <code>!git checkout dev &amp;&amp; git pull</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git conflicts</title>
    <link href="https://www.timhilton.xyz/git-aliases/conflicts/"/>
    <id>https://www.timhilton.xyz/git-aliases/conflicts/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>!git ls-files --unmerged | cut -f2 | sort -u</summary>
    <content type="html">
      <![CDATA[<p>List all files that currently have merge conflicts. This is helpful during merge or rebase operations to quickly see which files need conflict resolution, without having to parse through the full output of <code>git status</code>.</p>
<p>Found at <a href="https://stackoverflow.com/a/11014518/4051181">https://stackoverflow.com/a/11014518/4051181</a></p>
<p><code>git conflicts</code> — <code>!git ls-files --unmerged | cut -f2 | sort -u</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git cor</title>
    <link href="https://www.timhilton.xyz/git-aliases/cor/"/>
    <id>https://www.timhilton.xyz/git-aliases/cor/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>!f() { git checkout releases/sprint-$1 &amp;&amp; git pull origin releases/sprint-$1; }; f</summary>
    <content type="html">
      <![CDATA[<p>Checkout a <code>release</code> branch based on a <code>releases/sprint-x</code> naming convention, and pull the latest changes from the remote. Similar to the <code>cdp</code> alias but for the release branch, this quickly switches you to the release branch and ensures you have the most up-to-date code.</p>
<p><code>git cor</code> — <code>!f() { git checkout releases/sprint-$1 &amp;&amp; git pull origin releases/sprint-$1; }; f</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git dev</title>
    <link href="https://www.timhilton.xyz/git-aliases/dev/"/>
    <id>https://www.timhilton.xyz/git-aliases/dev/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>!git pull origin dev &amp;&amp; git merge dev &amp;&amp; git fetch origin dev:dev</summary>
    <content type="html">
      <![CDATA[<p>Merge latest <code>dev</code> branch code into your current branch and update your local <code>dev</code> branch. Assumes you have a branch called <code>dev</code> both locally and on the <code>origin</code> remote. This alias is useful for keeping your feature branches up-to-date with the latest development work.</p>
<p>This alias pulls the latest dev branch from origin, merges it into your current branch, and updates your local dev branch to match origin/dev.</p>
<p><code>git dev</code> — <code>!git pull origin dev &amp;&amp; git merge dev &amp;&amp; git fetch origin dev:dev</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git s</title>
    <link href="https://www.timhilton.xyz/git-aliases/s/"/>
    <id>https://www.timhilton.xyz/git-aliases/s/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>status</summary>
    <content type="html">
      <![CDATA[<p>Quick shorthand for <code>git status</code> to quickly check the current state of your working directory and staging area.</p>
<p><code>git s</code> — <code>status</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git squash</title>
    <link href="https://www.timhilton.xyz/git-aliases/squash/"/>
    <id>https://www.timhilton.xyz/git-aliases/squash/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>!f() { BRANCH=`git symbolic-ref --short HEAD`; git checkout ${1}; git merge --squash $BRANCH; }; f</summary>
    <content type="html">
      <![CDATA[<p>Squash commits from the current branch into another branch. This function takes all commits from the current branch and squashes them into a single commit on the target branch. The result is not committed automatically, allowing you to review and write a commit message.</p>
<p>Modified from <a href="https://stackoverflow.com/a/37209562/4051181">https://stackoverflow.com/a/37209562/4051181</a>.</p>
<p>Usage: while on 'wip/12345', wanting to squash everything into 'feature/12345', run 'git squash feature/12345'.</p>
<p><code>git squash</code> — <code>!f() { BRANCH=`git symbolic-ref --short HEAD`; git checkout ${1}; git merge --squash $BRANCH; }; f</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git b</title>
    <link href="https://www.timhilton.xyz/git-aliases/b/"/>
    <id>https://www.timhilton.xyz/git-aliases/b/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>checkout -b</summary>
    <content type="html">
      <![CDATA[<p>Create a new local branch and check it out immediately.</p>
<p><code>git b</code> — <code>checkout -b</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git bs</title>
    <link href="https://www.timhilton.xyz/git-aliases/bs/"/>
    <id>https://www.timhilton.xyz/git-aliases/bs/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>branch --list</summary>
    <content type="html">
      <![CDATA[<p>List all local branches.</p>
<p><code>git bs</code> — <code>branch --list</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git co</title>
    <link href="https://www.timhilton.xyz/git-aliases/co/"/>
    <id>https://www.timhilton.xyz/git-aliases/co/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>checkout</summary>
    <content type="html">
      <![CDATA[<p>Check out a branch.</p>
<p><code>git co</code> — <code>checkout</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git cop</title>
    <link href="https://www.timhilton.xyz/git-aliases/cop/"/>
    <id>https://www.timhilton.xyz/git-aliases/cop/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>!f() { git branch -a | grep -m1 -e ${1}.*${2} | sed &quot;s/remotes&#92;/origin&#92;///&quot; | xargs git checkout; }; f</summary>
    <content type="html">
      <![CDATA[<p>Check out a branch by a partial branch name. This function searches for branches containing the provided pattern and checks out the first match.</p>
<p>I name branches with a reference to a work item number, then use the work item number to checkout the right branch. For example, the branch might be called <code>feature/12345-updated-invoice-structure</code> and I can check it out with <code>git cop 12345</code> or <code>git cop invoice</code>.</p>
<p>From <a href="https://stackoverflow.com/a/61309684/4051181">Stack Overflow</a>.</p>
<p><code>git cop</code> — <code>!f() { git branch -a | grep -m1 -e ${1}.*${2} | sed &quot;s/remotes&#92;/origin&#92;///&quot; | xargs git checkout; }; f</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git db</title>
    <link href="https://www.timhilton.xyz/git-aliases/db/"/>
    <id>https://www.timhilton.xyz/git-aliases/db/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>branch -D</summary>
    <content type="html">
      <![CDATA[<p>Delete a local branch. Use with caution as this permanently deletes the branch, even if it hasn't been merged.</p>
<p><code>git db</code> — <code>branch -D</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git rename-branch</title>
    <link href="https://www.timhilton.xyz/git-aliases/rename-branch/"/>
    <id>https://www.timhilton.xyz/git-aliases/rename-branch/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>branch -m</summary>
    <content type="html">
      <![CDATA[<p>Rename the current branch.</p>
<p><code>git rename-branch</code> — <code>branch -m</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git com</title>
    <link href="https://www.timhilton.xyz/git-aliases/com/"/>
    <id>https://www.timhilton.xyz/git-aliases/com/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>!git add -A &amp;&amp; git commit -m</summary>
    <content type="html">
      <![CDATA[<p>Stage all changes (including new files, modifications, and deletions) and open the commit message editor. This is a quick way to commit all your work from the command line without having to run separate <code>git add</code> and <code>git commit</code> commands.</p>
<p><code>git com</code> — <code>!git add -A &amp;&amp; git commit -m</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git done</title>
    <link href="https://www.timhilton.xyz/git-aliases/done/"/>
    <id>https://www.timhilton.xyz/git-aliases/done/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>!f() { branch=${1:-dev}; git fetch &amp;&amp; git checkout &quot;$branch&quot; &amp;&amp; git pull &amp;&amp; git merged &amp;&amp; git status; }; f</summary>
    <content type="html">
      <![CDATA[<p>Switch from a feature branch to the latest code in a base branch (defaults to <code>dev</code>), and delete branches which are fully merged into that branch. This alias is intended for use after pushing a code-complete feature branch to the server, when ready to start a new feature based on the latest branch code. Pass an optional branch name to use a different base branch (e.g. <code>git done main</code>).</p>
<p><code>git done</code> — <code>!f() { branch=${1:-dev}; git fetch &amp;&amp; git checkout &quot;$branch&quot; &amp;&amp; git pull &amp;&amp; git merged &amp;&amp; git status; }; f</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git merged-into</title>
    <link href="https://www.timhilton.xyz/git-aliases/merged-into/"/>
    <id>https://www.timhilton.xyz/git-aliases/merged-into/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>!f() { git branch --merged &quot;$1&quot; | grep -v &quot; $1$&quot; | xargs -r git branch -d; }; f</summary>
    <content type="html">
      <![CDATA[<p>Delete all local branches that have been fully merged into the specified branch. Similar to the <code>merged</code> alias but allows you to specify any branch name as the target. For example, <code>git merged-into main</code> will delete all branches merged into <code>main</code>.</p>
<p><code>git merged-into</code> — <code>!f() { git branch --merged &quot;$1&quot; | grep -v &quot; $1$&quot; | xargs -r git branch -d; }; f</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git merged</title>
    <link href="https://www.timhilton.xyz/git-aliases/merged/"/>
    <id>https://www.timhilton.xyz/git-aliases/merged/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>!f() { git branch --merged dev | grep -v &quot; dev$&quot; | xargs -r git branch -d; }; f</summary>
    <content type="html">
      <![CDATA[<p>Delete local branches which have been fully merged into <code>dev</code> branch (excluding the <code>dev</code> branch itself). Useful for cleaning up completed feature branches.</p>
<p>From <a href="https://www.atlassian.com/blog/git/advanced-git-aliases">Advanced Git Aliases</a> published by Atlassian.</p>
<p><code>git merged</code> — <code>!f() { git branch --merged dev | grep -v &quot; dev$&quot; | xargs -r git branch -d; }; f</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git npmci</title>
    <link href="https://www.timhilton.xyz/git-aliases/npmci/"/>
    <id>https://www.timhilton.xyz/git-aliases/npmci/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>!f() { git ls-files &quot;*/package.json&quot; | sed &quot;s|/[^/]*$||&quot; | sort -u | xargs -I {} sh -c &quot;echo &#39;Running npm ci in {}&#39; &amp;&amp; cd {} &amp;&amp; npm ci&quot;; }; f</summary>
    <content type="html">
      <![CDATA[<p>Run <code>npm ci</code> in all directories that contain a <code>package.json</code> file. This is useful in monorepo setups or projects with multiple npm packages, allowing you to install all dependencies in a single command with clean installs.</p>
<p><code>git npmci</code> — <code>!f() { git ls-files &quot;*/package.json&quot; | sed &quot;s|/[^/]*$||&quot; | sort -u | xargs -I {} sh -c &quot;echo &#39;Running npm ci in {}&#39; &amp;&amp; cd {} &amp;&amp; npm ci&quot;; }; f</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git npmi</title>
    <link href="https://www.timhilton.xyz/git-aliases/npmi/"/>
    <id>https://www.timhilton.xyz/git-aliases/npmi/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>!f() { git ls-files &quot;*/package.json&quot; | sed &quot;s|/[^/]*$||&quot; | sort -u | xargs -I {} sh -c &quot;echo &#39;Running npm i in {}&#39; &amp;&amp; cd {} &amp;&amp; npm i&quot;; }; f</summary>
    <content type="html">
      <![CDATA[<p>Run <code>npm install</code> in all directories that contain a <code>package.json</code> file. Similar to <code>npmci</code> but uses <code>npm install</code> instead of <code>npm ci</code>, allowing package-lock.json to be updated if needed. Useful for updating dependencies across multiple packages in a monorepo.</p>
<p><code>git npmi</code> — <code>!f() { git ls-files &quot;*/package.json&quot; | sed &quot;s|/[^/]*$||&quot; | sort -u | xargs -I {} sh -c &quot;echo &#39;Running npm i in {}&#39; &amp;&amp; cd {} &amp;&amp; npm i&quot;; }; f</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git open</title>
    <link href="https://www.timhilton.xyz/git-aliases/open/"/>
    <id>https://www.timhilton.xyz/git-aliases/open/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>!f() { root=$(git rev-parse --show-toplevel); if command -v grep &gt;/dev/null 2&gt;&amp;1; then file=$(git ls-files | grep -m1 &quot;/[^/]*$1[^/]*$&quot;); else file=$(git ls-files | findstr /R &quot;[^/]*$1[^/]*$&quot; | head -1); fi; if [ -n &quot;$file&quot; ]; then start &quot;&quot; &quot;C:&#92;Program Files&#92;Notepad++&#92;notepad++.exe&quot; &quot;$root/$file&quot;; else echo &quot;No file found matching: $1&quot;; fi; }; f</summary>
    <content type="html">
      <![CDATA[<p>Open a file in Notepad++ directly from the Git command line.</p>
<h3 id="explanation" tabindex="-1">Explanation</h3>
<p>Open the first file whose filename (not path) contains the specified search term.<br>
Intended usage is for a complete or partial file name - does not match against directory names.<br>
File is opened in Notepad++ and the alias assumes this is installed in C:/Program Files/Notepad++<br>
Tested in powershell, command prompt, and git bash.<br>
Explanation:<br>
root is the file path to the git repository.<br>
file is the file path within the repository for the first file found matching the search term.<br>
Uses grep/findstr to match only against the basename (filename) portion of the path, not directories.<br>
Checks if grep is available and uses it, otherwise falls back to a Windows-compatible approach.<br>
Validates that a file was found before attempting to open it.<br>
Calculates root and file, then starts notepad++.exe and passes the absolute file path in.<br>
Note that it uses <code>start</code> so that the command finishes executing without waiting for notepad++ to close.</p>
<p><code>git open</code> — <code>!f() { root=$(git rev-parse --show-toplevel); if command -v grep &gt;/dev/null 2&gt;&amp;1; then file=$(git ls-files | grep -m1 &quot;/[^/]*$1[^/]*$&quot;); else file=$(git ls-files | findstr /R &quot;[^/]*$1[^/]*$&quot; | head -1); fi; if [ -n &quot;$file&quot; ]; then start &quot;&quot; &quot;C:&#92;Program Files&#92;Notepad++&#92;notepad++.exe&quot; &quot;$root/$file&quot;; else echo &quot;No file found matching: $1&quot;; fi; }; f</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git start</title>
    <link href="https://www.timhilton.xyz/git-aliases/start/"/>
    <id>https://www.timhilton.xyz/git-aliases/start/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>!git add -A &amp;&amp; git apply-stash config</summary>
    <content type="html">
      <![CDATA[<p>Stages all changes (including new, modified, deleted, and renamed files) and applies the latest stash. Intended usage is when starting a project where configuration changes are stored in a stash. Before starting the application, we want to apply the latest stash containing the word 'config' but keep them separate from the changes under test (which is why they are staged).</p>
<p><code>git start</code> — <code>!git add -A &amp;&amp; git apply-stash config</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git stop</title>
    <link href="https://www.timhilton.xyz/git-aliases/stop/"/>
    <id>https://www.timhilton.xyz/git-aliases/stop/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>!git checkout -- . &amp;&amp; git clean -fd</summary>
    <content type="html">
      <![CDATA[<p>Reverts all unstaged changes to tracked files, and delete all untracked files and directories. Intended usage is when stopping a project where configuration changes are stored in a stash. When we stop the application, we want to revert the unstaged changes  (which we are expecting to just be the configuration changes) so we have a clean working directory.</p>
<p><code>git stop</code> — <code>!git checkout -- . &amp;&amp; git clean -fd</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git uncommit</title>
    <link href="https://www.timhilton.xyz/git-aliases/uncommit/"/>
    <id>https://www.timhilton.xyz/git-aliases/uncommit/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>reset --mixed HEAD~1</summary>
    <content type="html">
      <![CDATA[<p>Undo the latest commit, removing the commit from history and leaving the changes from the commit unstaged.</p>
<p><code>git uncommit</code> — <code>reset --mixed HEAD~1</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git conf</title>
    <link href="https://www.timhilton.xyz/git-aliases/conf/"/>
    <id>https://www.timhilton.xyz/git-aliases/conf/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>config --global -e</summary>
    <content type="html">
      <![CDATA[<p>Open your git config in your default editor so you can easily review and update it. Save any changes you make, then close the text editor when you're finished. This command will not finish until you close the text editor.</p>
<p><code>git conf</code> — <code>config --global -e</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git f</title>
    <link href="https://www.timhilton.xyz/git-aliases/f/"/>
    <id>https://www.timhilton.xyz/git-aliases/f/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>fetch --prune</summary>
    <content type="html">
      <![CDATA[<p>Fetch latest changes from the server and remove references to deleted remote branches.</p>
<p><code>git f</code> — <code>fetch --prune</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git pl</title>
    <link href="https://www.timhilton.xyz/git-aliases/pl/"/>
    <id>https://www.timhilton.xyz/git-aliases/pl/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>pull</summary>
    <content type="html">
      <![CDATA[<p>Pull latest changes. Shorthand for <code>git pull</code> to fetch and merge changes from the upstream branch. Added for consistency with the 2-character <code>ps</code> alias.</p>
<p><code>git pl</code> — <code>pull</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git ps</title>
    <link href="https://www.timhilton.xyz/git-aliases/ps/"/>
    <id>https://www.timhilton.xyz/git-aliases/ps/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>push -u origin HEAD</summary>
    <content type="html">
      <![CDATA[<p>Push commits to a remote branch on the <code>origin</code> remote. If there is no upstream branch on <code>origin</code>, one will be created.</p>
<p>I prefer this alias to running <code>git push</code> because it works regardless of whether or not there is an existing upstream branch.</p>
<p><code>git ps</code> — <code>push -u origin HEAD</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git pt</title>
    <link href="https://www.timhilton.xyz/git-aliases/pt/"/>
    <id>https://www.timhilton.xyz/git-aliases/pt/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>!f() { BRANCH=`git symbolic-ref --short HEAD`; git push -u origin ${1}:refs/heads/$BRANCH; }; f</summary>
    <content type="html">
      <![CDATA[<p>Push up to a specific commit. This function pushes the current branch up to a specific commit hash. My main use case for this is when making changes to a branch which already has a Pull Request in Azure DevOps. The changes in each push can be reviewed as separate updates to the PR, so I can make a series of commits then push them as multiple logical updates for easier review.</p>
<p>I based this alias on <a href="https://coderwall.com/p/hexinq/git-push-up-to-a-certain-commit">https://coderwall.com/p/hexinq/git-push-up-to-a-certain-commit</a></p>
<p><code>git pt</code> — <code>!f() { BRANCH=`git symbolic-ref --short HEAD`; git push -u origin ${1}:refs/heads/$BRANCH; }; f</code></p>]]>
    </content>
  </entry>
  
  <entry>
    <title>git unpushed</title>
    <link href="https://www.timhilton.xyz/git-aliases/unpushed/"/>
    <id>https://www.timhilton.xyz/git-aliases/unpushed/</id>
    <updated>2026-03-02T00:00:00Z</updated>
    <summary>cherry -v</summary>
    <content type="html">
      <![CDATA[<p>View commits on the current local branch which have not yet been pushed to the server.</p>
<p><code>git unpushed</code> — <code>cherry -v</code></p>]]>
    </content>
  </entry>
  
</feed>
