<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Matías Denda</title>
    <description>The latest articles on DEV Community by Matías Denda (@matutetandil).</description>
    <link>https://dev.to/matutetandil</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3601966%2F6aebccb4-b6ac-40c9-98c1-0eb5fa97d314.png</url>
      <title>DEV Community: Matías Denda</title>
      <link>https://dev.to/matutetandil</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/matutetandil"/>
    <language>en</language>
    <item>
      <title>What actually happens when you `git merge --no-ff`</title>
      <dc:creator>Matías Denda</dc:creator>
      <pubDate>Tue, 21 Apr 2026 14:48:28 +0000</pubDate>
      <link>https://dev.to/matutetandil/what-actually-happens-when-you-git-merge-no-ff-4il1</link>
      <guid>https://dev.to/matutetandil/what-actually-happens-when-you-git-merge-no-ff-4il1</guid>
      <description>&lt;p&gt;Most developers use &lt;code&gt;git merge&lt;/code&gt; without ever thinking about what's happening internally. Then one day they see &lt;code&gt;--no-ff&lt;/code&gt; in a team's workflow documentation, Google it, read three Stack Overflow answers, and walk away with a vague sense that "it creates a merge commit or something."&lt;/p&gt;

&lt;p&gt;This post is the version I wish I'd read earlier. Two diagrams, one clear distinction, and why it actually matters for your team.&lt;/p&gt;

&lt;h2&gt;
  
  
  The setup
&lt;/h2&gt;

&lt;p&gt;You're on &lt;code&gt;main&lt;/code&gt;. Your coworker merged their feature. You branched off, added two commits, and now it's time to merge your branch back. What happens next depends on one flag.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# You're here&lt;/span&gt;
git checkout main
git merge feature
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Git has two ways to integrate your feature branch into &lt;code&gt;main&lt;/code&gt;. The one it picks by default depends on whether the branches have &lt;em&gt;diverged&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Case 1: Fast-forward (the default, when possible)
&lt;/h2&gt;

&lt;p&gt;If &lt;code&gt;main&lt;/code&gt; hasn't moved since you branched off, Git doesn't create a new commit. It just moves the &lt;code&gt;main&lt;/code&gt; pointer forward to the tip of your feature branch.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2bentvl8nu0tmo6qx8gp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2bentvl8nu0tmo6qx8gp.png" alt="Fast-forward merge: main pointer simply moves forward, no new commit" width="800" height="311"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's it. No merge commit. The feature branch and &lt;code&gt;main&lt;/code&gt; now point to the same commit. If you look at &lt;code&gt;git log&lt;/code&gt; on &lt;code&gt;main&lt;/code&gt;, it reads like D and E were always there. The branch effectively disappears from history.&lt;/p&gt;

&lt;h2&gt;
  
  
  Case 2: &lt;code&gt;--no-ff&lt;/code&gt; (always create a merge commit)
&lt;/h2&gt;

&lt;p&gt;With &lt;code&gt;--no-ff&lt;/code&gt;, Git creates an explicit merge commit even when a fast-forward was possible:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnxei2tu2p244tldnal7j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnxei2tu2p244tldnal7j.png" alt="no-ff merge: a new merge commit M is created with two parents" width="800" height="311"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;M&lt;/code&gt; is a new commit whose parents are &lt;code&gt;C&lt;/code&gt; (the previous tip of main) and &lt;code&gt;E&lt;/code&gt; (the tip of feature). It has no code changes of its own — its diff is empty — but it records that &lt;em&gt;these commits were integrated together at this point&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this distinction matters
&lt;/h2&gt;

&lt;p&gt;The two histories above contain the same code. So does it matter? Yes, and here's where it bites real teams.&lt;/p&gt;

&lt;h3&gt;
  
  
  It matters for &lt;code&gt;git bisect&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;git bisect&lt;/code&gt; helps you find which commit introduced a bug by doing a binary search through history. With fast-forward merges, the search descends into individual feature commits — you might land on a half-finished refactor where the bug is genuinely present but so is a broken test, making the bisect useless.&lt;/p&gt;

&lt;p&gt;With &lt;code&gt;--no-ff&lt;/code&gt;, you can run &lt;code&gt;git bisect --first-parent&lt;/code&gt; and bisect &lt;em&gt;merge commits only&lt;/em&gt;, treating each feature as an atomic unit. Found the regression? You know which feature to revert, not which arbitrary mid-feature commit to blame.&lt;/p&gt;

&lt;h3&gt;
  
  
  It matters for &lt;code&gt;git revert&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;If you merged with &lt;code&gt;--no-ff&lt;/code&gt; and need to roll back the feature, you revert the single merge commit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git revert &lt;span class="nt"&gt;-m&lt;/span&gt; 1 &amp;lt;merge-commit-hash&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That undoes all of D and E in one go. With fast-forward, you'd need to revert each commit individually — or figure out which commits belonged to the feature in the first place.&lt;/p&gt;

&lt;h3&gt;
  
  
  It matters for reading history
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;git log --graph --first-parent main&lt;/code&gt; with &lt;code&gt;--no-ff&lt;/code&gt; merges shows you a clean list of features integrated into main, one per line. Without merge commits, the log is a flat stream of every individual commit ever made. For a large team, the difference is between "I can see what shipped last week" and "good luck."&lt;/p&gt;

&lt;h2&gt;
  
  
  What GitHub and GitLab do
&lt;/h2&gt;

&lt;p&gt;When you click "Merge pull request" on GitHub or GitLab, they default to creating a merge commit (&lt;code&gt;--no-ff&lt;/code&gt; behavior). The "Rebase and merge" and "Squash and merge" options exist too, but the default merge commit exists precisely because of the benefits above.&lt;/p&gt;

&lt;p&gt;This is why teams that use the GitHub/GitLab UI religiously often have cleaner history than teams that merge locally on the command line — the UI forces a pattern that the command line leaves optional.&lt;/p&gt;

&lt;h2&gt;
  
  
  When fast-forward is fine
&lt;/h2&gt;

&lt;p&gt;For throwaway branches, personal experiments, or single-commit fixes where the commit already tells the whole story, fast-forward is perfectly appropriate. The rule of thumb I use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Single commit fix&lt;/strong&gt; → fast-forward is fine&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feature branch with 2+ commits&lt;/strong&gt; → &lt;code&gt;--no-ff&lt;/code&gt; preserves the grouping&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Release branch merge&lt;/strong&gt; → always &lt;code&gt;--no-ff&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hotfix branch merge&lt;/strong&gt; → always &lt;code&gt;--no-ff&lt;/code&gt; (you want revertability)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Making it a team default
&lt;/h2&gt;

&lt;p&gt;If you want the team to use &lt;code&gt;--no-ff&lt;/code&gt; consistently, either set it at the repo level:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git config &lt;span class="nt"&gt;--global&lt;/span&gt; merge.ff &lt;span class="nb"&gt;false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or — better — require it via branch protection rules on your hosting platform. That way nobody's local config can bypass it.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;This post is adapted from a chapter of &lt;em&gt;&lt;a href="https://mdenda.gumroad.com/l/git-in-depth" rel="noopener noreferrer"&gt;Git in Depth: From Solo Developer to Engineering Teams&lt;/a&gt;&lt;/em&gt;, a 658-page book I just released on Git for working developers — from day-to-day tools to CI/CD, branching strategies, and Git at organizational scale. Launch price $29 with code &lt;code&gt;EARLYBIRD&lt;/code&gt; (first 100 copies).&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Next week: &lt;em&gt;git worktree — the stash replacement nobody teaches you&lt;/em&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>git</category>
      <category>devops</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Automatic Node.js Version Switching Across Projects</title>
      <dc:creator>Matías Denda</dc:creator>
      <pubDate>Fri, 07 Nov 2025 21:21:15 +0000</pubDate>
      <link>https://dev.to/matutetandil/automatic-nodejs-version-switching-across-projects-2dae</link>
      <guid>https://dev.to/matutetandil/automatic-nodejs-version-switching-across-projects-2dae</guid>
      <description>&lt;h1&gt;
  
  
  The Challenge
&lt;/h1&gt;

&lt;p&gt;Modern JavaScript development often involves working on multiple projects simultaneously. Each project may require a different Node.js version:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Legacy project: Node 14&lt;/li&gt;
&lt;li&gt;Production app: Node 18 LTS&lt;/li&gt;
&lt;li&gt;New experimental project: Node 20&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Manually switching versions between projects adds friction to your workflow. You need to remember which version each project uses and run the appropriate commands when switching contexts.&lt;/p&gt;

&lt;h1&gt;
  
  
  What is AutoNode?
&lt;/h1&gt;

&lt;p&gt;AutoNode is a CLI tool that automatically detects and switches to the correct Node.js version when you navigate between projects. It works seamlessly with your existing version manager (nvm, nvs, or Volta).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key features:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🔍 Automatic version detection from multiple sources&lt;/li&gt;
&lt;li&gt;⚡ Zero runtime dependencies (single native binary)&lt;/li&gt;
&lt;li&gt;🔄 Works with your existing version manager&lt;/li&gt;
&lt;li&gt;🌍 Cross-platform (macOS, Linux, Windows)&lt;/li&gt;
&lt;li&gt;📦 Under 6MB with everything included&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Version Detection
&lt;/h3&gt;

&lt;p&gt;AutoNode reads version requirements from multiple sources (in priority order):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;.nvmrc&lt;/code&gt;&lt;/strong&gt; - Standard nvm configuration file&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;.node-version&lt;/code&gt;&lt;/strong&gt; - Alternative version file format&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;package.json&lt;/code&gt;&lt;/strong&gt; - Reads &lt;code&gt;engines.node&lt;/code&gt; field&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;Dockerfile&lt;/code&gt;&lt;/strong&gt; - Parses &lt;code&gt;FROM node:X&lt;/code&gt; declarations&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This multi-source approach ensures compatibility with different project conventions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Shell Integration
&lt;/h3&gt;

&lt;p&gt;When you &lt;code&gt;cd&lt;/code&gt; into a project directory, AutoNode:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Detects the required Node.js version&lt;/li&gt;
&lt;li&gt;Checks which version manager you have installed&lt;/li&gt;
&lt;li&gt;Switches to the appropriate version automatically&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The integration works through a shell hook similar to other developer tools like direnv or starship.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;One-line install:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/matutetandil/autonode/main/install.sh | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The installer will:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Detect your platform and architecture&lt;/li&gt;
&lt;li&gt;Download the appropriate binary&lt;/li&gt;
&lt;li&gt;Install to a standard location&lt;/li&gt;
&lt;li&gt;Configure shell integration for bash/zsh/fish&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Manual Commands
&lt;/h2&gt;

&lt;p&gt;You can also use AutoNode manually:&lt;/p&gt;

&lt;h3&gt;
  
  
  Check detected version without switching
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;autonode &lt;span class="nt"&gt;--check&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Force reinstall detected version
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;autonode &lt;span class="nt"&gt;--force&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Update AutoNode itself
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  autonode update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Real-World Use Cases
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Development Teams
&lt;/h2&gt;

&lt;p&gt;Ensure all team members use consistent Node.js versions across projects without manual intervention.&lt;/p&gt;

&lt;h2&gt;
  
  
  CI/CD Pipelines
&lt;/h2&gt;

&lt;p&gt;Automatically use the correct Node version in build scripts without hardcoding version numbers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Monorepo Management
&lt;/h2&gt;

&lt;p&gt;Different packages in a monorepo can specify different Node requirements, and AutoNode handles transitions seamlessly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Docker Development
&lt;/h2&gt;

&lt;p&gt;Parse Node versions directly from Dockerfiles to match your local environment with production.&lt;/p&gt;

&lt;h2&gt;
  
  
  Compatibility
&lt;/h2&gt;

&lt;p&gt;Operating Systems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;macOS (Intel &amp;amp; Apple Silicon)&lt;/li&gt;
&lt;li&gt;Linux (AMD64 &amp;amp; ARM64)&lt;/li&gt;
&lt;li&gt;Windows (AMD64)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Version Managers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;nvm (Node Version Manager)&lt;/li&gt;
&lt;li&gt;nvs (Node Version Switcher)&lt;/li&gt;
&lt;li&gt;Volta&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Shells:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;bash&lt;/li&gt;
&lt;li&gt;zsh&lt;/li&gt;
&lt;li&gt;fish&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Roadmap
&lt;/h1&gt;

&lt;p&gt;Planned improvements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Additional version manager support (fnm, asdf)&lt;/li&gt;
&lt;li&gt;Configuration file for custom behavior&lt;/li&gt;
&lt;li&gt;Shell completion scripts&lt;/li&gt;
&lt;li&gt;Package manager distribution (Homebrew, apt)&lt;/li&gt;
&lt;li&gt;Pre-commit hooks integration&lt;/li&gt;
&lt;li&gt;CI/CD action/workflow templates&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Contributing&lt;/p&gt;

&lt;p&gt;AutoNode is open source and welcomes contributions. Whether it's:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bug reports and fixes&lt;/li&gt;
&lt;li&gt;New version detector implementations&lt;/li&gt;
&lt;li&gt;Version manager integrations&lt;/li&gt;
&lt;li&gt;Documentation improvements&lt;/li&gt;
&lt;li&gt;Feature requests&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Check out the &lt;a href="https://github.com/matutetandil/autonode" rel="noopener noreferrer"&gt;https://github.com/matutetandil/autonode&lt;/a&gt; to get involved.&lt;/p&gt;

&lt;h1&gt;
  
  
  Try It Out
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Installation:
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/matutetandil/autonode/main/install.sh | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Quick test:
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nb"&gt;mkdir &lt;/span&gt;test-project &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd &lt;/span&gt;test-project
  &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"18.17.0"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; .nvmrc
  &lt;span class="c"&gt;# AutoNode switches automatically&lt;/span&gt;
  node &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Feedback Wanted:
&lt;/h1&gt;

&lt;p&gt;I'm actively looking for feedback on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does it work reliably with your setup?&lt;/li&gt;
&lt;li&gt;Any edge cases in version detection?&lt;/li&gt;
&lt;li&gt;Performance in large monorepos?&lt;/li&gt;
&lt;li&gt;Installation experience on different platforms?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Feel free to open an issue or start a discussion on GitHub!&lt;/p&gt;

&lt;p&gt;Resources&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub Repository: &lt;a href="https://github.com/matutetandil/autonode" rel="noopener noreferrer"&gt;https://github.com/matutetandil/autonode&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Documentation: Full setup and usage guide in the README&lt;/li&gt;
&lt;li&gt;Installation Script: Direct download and shell integration&lt;/li&gt;
&lt;li&gt;Releases: Pre-built binaries for all platforms&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;AutoNode aims to simplify Node.js version management across projects. If you find it useful or have suggestions, I'd love to hear from you!&lt;/p&gt;




</description>
      <category>go</category>
      <category>node</category>
      <category>cli</category>
      <category>devtools</category>
    </item>
  </channel>
</rss>
