<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Specita Blog]]></title><description><![CDATA[Specita Blog]]></description><link>https://specita.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6b05425020f32db89d1545ae/f68ed291-fcd8-4476-900f-58fea354ad07.png</url><title>Specita Blog</title><link>https://specita.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Wed, 25 Nov 2026 08:48:53 GMT</lastBuildDate><atom:link href="https://specita.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[GitHub compare two tags: see what changed between releases]]></title><description><![CDATA[Compare two tags on GitHub with the compare URL, the CLI or the API, and learn what two dots and three dots mean.]]></description><link>https://specita.hashnode.dev/github-compare-two-tags-see-what-changed-between-releases</link><guid isPermaLink="true">https://specita.hashnode.dev/github-compare-two-tags-see-what-changed-between-releases</guid><category><![CDATA[GitHub]]></category><category><![CDATA[Git]]></category><category><![CDATA[Devops]]></category><category><![CDATA[Tutorial]]></category><dc:creator><![CDATA[Taimoor Taak]]></dc:creator><pubDate>Tue, 24 Nov 2026 08:00:08 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6b05425020f32db89d1545ae/1c7795a9-e5dd-4f6f-b743-7e9d6df81dcb.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>To compare two tags on GitHub, open <code>https://github.com/OWNER/REPO/compare/v1.2.0...v1.3.0</code>. The first tag is the base, and the second is what you're comparing it to. GitHub shows the commits, the changed files, and the contributors between them. It's the quickest way to answer "what went into this release?", and the same comparison works from the <code>gh</code> CLI and the REST API.</p>
<h2>How to compare two tags in the browser</h2>
<p>You have two routes. <a href="https://docs.github.com/en/pull-requests/committing-changes-to-your-project/viewing-and-comparing-commits/comparing-commits">GitHub's docs</a> describe appending <code>/compare</code> to your repository's path.</p>
<ol>
<li>Open <code>https://github.com/OWNER/REPO/compare</code>.</li>
<li>In the <strong>base</strong> dropdown, pick the older tag. You can type a tag name there, even though it's labeled as a branch.</li>
<li>In the <strong>compare</strong> dropdown, pick the newer tag.</li>
</ol>
<p>Or just edit the URL directly:</p>
<pre><code class="language-text">https://github.com/acme/app/compare/v1.2.0...v1.3.0
</code></pre>
<p>Put the older tag first. If you reverse them, GitHub often shows "There isn't anything to compare", or the differences in the wrong direction.</p>
<p>The page has three useful parts: the commit list, the pull requests behind those commits if you follow them, and the file diff. For a large release, start with the commit list and only open the diff for the risky parts.</p>
<h2>Two dots and three dots</h2>
<p>This trips up nearly everyone at some point. Your URL can use either.</p>
<table>
<thead>
<tr>
<th>Syntax</th>
<th>What it shows</th>
<th>Use it when</th>
</tr>
</thead>
<tbody><tr>
<td><code>v1.2.0...v1.3.0</code> (three dots)</td>
<td>Changes on v1.3.0 since the point where the two lines diverged</td>
<td>You want to see what the newer tag added. The default</td>
</tr>
<tr>
<td><code>v1.2.0..v1.3.0</code> (two dots)</td>
<td>The direct difference between the two tags</td>
<td>You want the exact difference between the two</td>
</tr>
</tbody></table>
<p>For two tags on a straight line of history, the two forms give the same result. They differ when your tags sit on different branches. A hypothetical example: a hotfix tag <code>v1.2.1</code> on a release branch, compared to <code>v1.3.0</code> on main. Three dots shows what main has that the common ancestor doesn't, leaving out the hotfix's own changes. Two dots shows the difference between the code in each tag, including what the hotfix has that <code>v1.3.0</code> lacks. If you're asking "did the hotfix make it into 1.3.0?", two dots gives you a clearer answer.</p>
<h2>How to compare from the command line</h2>
<p>With plain Git, make sure that your tags are fetched first:</p>
<pre><code class="language-bash">git fetch --tags

git log --oneline v1.2.0..v1.3.0   # commits in v1.3.0 and not in v1.2.0
git diff --stat v1.2.0 v1.3.0      # files changed, with counts
git diff v1.2.0 v1.3.0 -- src/     # the diff, limited to a folder
</code></pre>
<p>Note how the dots mean something different here. In <code>git log</code>, two dots means commits reachable from the second and not the first, which is usually what you want for release notes. In <code>git diff</code>, two dots and a space do the same thing. This mismatch between <code>log</code> and <code>diff</code> is a long-standing Git quirk.</p>
<p>To list the pull requests in a range, the commit subjects usually include their numbers when you squash-merge. To open the comparison from your terminal:</p>
<pre><code class="language-bash">gh browse --no-browser   # prints the repository URL
gh api repos/acme/app/compare/v1.2.0...v1.3.0 --jq '.total_commits, .files[].filename'
</code></pre>
<h2>How to compare with the API</h2>
<p><a href="https://docs.github.com/en/rest/commits/commits#compare-two-commits">GitHub's REST API</a> has a compare endpoint that returns the same data as JSON:</p>
<pre><code class="language-bash">curl -H "Authorization: Bearer $GITHUB_TOKEN" \
  https://api.github.com/repos/acme/app/compare/v1.2.0...v1.3.0
</code></pre>
<p>The response includes <code>total_commits</code>, <code>commits</code>, and <code>files</code>. Results are paged, and a very large comparison won't return every file, so check the docs if your releases are big. Use a read-only token, and keep it out of your scripts.</p>
<h2>Why a comparison can look wrong</h2>
<p>If the page says there's nothing to compare, check the order of the tags, then whether both tags exist on GitHub. A tag you created locally doesn't appear until you push it with <code>git push origin v1.3.0</code>.</p>
<p>If the commit count is huge, check the tag you think of as the base. If you tagged on a branch that was later rebased, or moved a tag, the shared history may be less than you'd expect. Don't move release tags. Create a new one, so that a tag means the same thing forever.</p>
<p>If the changes don't match what's in production, the tag may not be what you shipped. Compare the commit SHA your deployment reports with the commit the tag points at. A build from an untagged commit is a common cause.</p>
<h2>Using a comparison for a release review</h2>
<p>A comparison is useful for more than curiosity. Before a release, read it with these questions:</p>
<ul>
<li>Which changes touch payment, auth, or data migrations?</li>
<li>Did anything merge after QA signed off?</li>
<li>Are there dependency or lockfile changes you didn't expect?</li>
<li>Who should check the riskiest change?</li>
</ul>
<p>After an incident, the same page narrows the search. If a crash started with <code>v1.3.0</code>, this comparison is your list of suspects. It's also how you plan an <a href="https://specita.com/blog/ios-app-rollback">iOS app rollback</a> or a <a href="https://specita.com/blog/hotfix-process">hotfix</a>, since it shows what you'd be taking out. To turn the list into something readable, use a <a href="https://specita.com/blog/release-notes-template">release notes template</a>.</p>
<h2>Tags for mobile releases</h2>
<p>Tag every build you might ship, including the build number. For example, <code>ios/2.4.0+317</code> and <code>android/2.4.0+318</code>. Now every App Store or Google Play version maps to a commit, and you can compare the two on the same day that a client asks what changed.</p>
<p><em>GitHub guidance checked on November 4, 2026.</em></p>
<p><em>This article was created with the help of AI and checked against GitHub's documentation. It first appeared on the</em> <a href="https://specita.com/blog/github-compare-two-tags"><em>Specita blog</em></a><em>.</em></p>
]]></content:encoded></item></channel></rss>