<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>VSCode on Yarang's Tech Lair</title><link>https://blog.fcoinfup.com/tags/vscode/</link><description>Recent content in VSCode on Yarang's Tech Lair</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Sun, 03 May 2026 14:04:28 +0900</lastBuildDate><atom:link href="https://blog.fcoinfup.com/tags/vscode/index.xml" rel="self" type="application/rss+xml"/><item><title>Disabling Automatic 'Co-Authored-by' Insertion in VS Code Commit Messages: GitHub Copilot Settings Guide</title><link>https://blog.fcoinfup.com/post/disabling-automatic-co-authored-by-insertion-in-vs-code-commit-messages-github-copilot-settings-guide/</link><pubDate>Sun, 03 May 2026 14:04:28 +0900</pubDate><guid>https://blog.fcoinfup.com/post/disabling-automatic-co-authored-by-insertion-in-vs-code-commit-messages-github-copilot-settings-guide/</guid><description>&lt;h1 id="disabling-automatic-co-authored-by-insertion-in-vs-code-commit-messages"&gt;Disabling Automatic &amp;lsquo;Co-Authored-by&amp;rsquo; Insertion in VS Code Commit Messages
&lt;/h1&gt;&lt;p&gt;Recently, when creating Git commits using VS Code, you may have experienced the phenomenon where a message like &lt;code&gt;Co-Authored-by: GitHub Copilot &amp;lt;copilot@github.com&amp;gt;&lt;/code&gt; is automatically inserted at the bottom of the commit message unintentionally. This issue was also a hot topic on sites like Hacker News under the title &amp;ldquo;VS Code inserting &amp;lsquo;Co-Authored-by Copilot&amp;rsquo; into commits regardless of usage&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;Even if the AI did not write the code or simply checked the syntax, if this message is included, the commit history can become cluttered and &lt;strong&gt;Credit&lt;/strong&gt; attribution can become ambiguous.&lt;/p&gt;
&lt;p&gt;In this post, we explain step-by-step the cause of this feature and how to cleanly disable it through VS Code settings.&lt;/p&gt;
&lt;h2 id="verifying-the-issue"&gt;Verifying the Issue
&lt;/h2&gt;&lt;p&gt;When you enter a commit message in VS Code&amp;rsquo;s Source Control panel and create a commit, the following line is added to the actual &lt;code&gt;.git/COMMIT_EDITMSG&lt;/code&gt; or the pushed history.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;feat: update user authentication logic
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Co-Authored-by: GitHub Copilot &amp;lt;copilot@github.com&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="cause-analysis"&gt;Cause Analysis
&lt;/h2&gt;&lt;p&gt;This phenomenon mainly occurs when the &lt;strong&gt;GitHub Copilot extension&lt;/strong&gt; and VS Code&amp;rsquo;s &lt;strong&gt;Smart Commit&lt;/strong&gt; feature are linked. When Copilot is activated within the IDE and there is a context where code generation or completion was suggested, the extension attempts to add itself as a co-author.&lt;/p&gt;
&lt;p&gt;From the user&amp;rsquo;s perspective, they may have simply received variable name auto-completion, so applying this feature to every commit might be considered excessive behavior.&lt;/p&gt;
&lt;h2 id="solution-changing-vs-code-settings"&gt;Solution: Changing VS Code Settings
&lt;/h2&gt;&lt;p&gt;The most definitive solution is to modify VS Code&amp;rsquo;s user settings (&lt;code&gt;settings.json&lt;/code&gt;) to prevent Copilot from intervening during commit creation.&lt;/p&gt;
&lt;h3 id="1-open-settings"&gt;1. Open Settings
&lt;/h3&gt;&lt;p&gt;Press &lt;code&gt;Ctrl + Shift + P&lt;/code&gt; (Mac: &lt;code&gt;Cmd + Shift + P&lt;/code&gt;) in VS Code to open the Command Palette. Type &lt;strong&gt;&lt;code&gt;Preferences: Open User Settings (JSON)&lt;/code&gt;&lt;/strong&gt; to open the settings file.&lt;/p&gt;
&lt;h3 id="2-add-settings-code"&gt;2. Add Settings Code
&lt;/h3&gt;&lt;p&gt;Add the following content inside the curly braces &lt;code&gt;{}&lt;/code&gt; of the opened &lt;code&gt;settings.json&lt;/code&gt; file. If there are already &lt;code&gt;github.copilot&lt;/code&gt; related settings, merge them.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-json" data-lang="json"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;#34;github.copilot.enableInlineCompletions&amp;#34;&lt;/span&gt;: &lt;span style="color:#66d9ef"&gt;true&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;#34;github.copilot.advanced&amp;#34;&lt;/span&gt;: {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;#34;inlineSuggest.count&amp;#34;&lt;/span&gt;: &lt;span style="color:#ae81ff"&gt;3&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; },
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// [Key Modification] Disable automatic Co-Authored-by insertion in commit messages
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;#34;github.copilot.inlineSuggest.enable&amp;#34;&lt;/span&gt;: &lt;span style="color:#66d9ef"&gt;false&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// Or turn off Copilot&amp;#39;s own co-author indication feature (if supported in latest version)
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;#34;github.copilot.commitMessage&amp;#34;&lt;/span&gt;: &lt;span style="color:#e6db74"&gt;&amp;#34;off&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
 &lt;blockquote&gt;
 &lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Option keys may vary depending on the versions of VS Code and the Copilot extension. The most common method is to minimize communication with Copilot at the moment of creating a commit.&lt;/p&gt;

 &lt;/blockquote&gt;
&lt;h3 id="3-alternative-method-using-git-hooks-optional"&gt;3. Alternative Method: Using Git Hooks (Optional)
&lt;/h3&gt;&lt;p&gt;If the issue is not resolved by settings alone, you can use Git&amp;rsquo;s &lt;code&gt;prepare-commit-msg&lt;/code&gt; hook to forcibly remove that line. Create or modify the &lt;code&gt;.git/hooks/prepare-commit-msg&lt;/code&gt; file (no extension) in the project root.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;#!/bin/sh
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Get commit message file path&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;COMMIT_MSG_FILE&lt;span style="color:#f92672"&gt;=&lt;/span&gt;$1
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Remove lines containing &amp;#39;Co-Authored-by: GitHub Copilot&amp;#39; from file content&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# macOS/BSD sed (macOS default)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sed -i &lt;span style="color:#e6db74"&gt;&amp;#39;&amp;#39;&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#39;/Co-Authored-by: GitHub Copilot/d&amp;#39;&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$COMMIT_MSG_FILE&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Linux sed (WSL, Linux servers, etc.)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# sed -i &amp;#39;/Co-Authored-by: GitHub Copilot/d&amp;#39; &amp;#34;$COMMIT_MSG_FILE&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After saving this script and granting execution permissions (&lt;code&gt;chmod +x .git/hooks/prepare-commit-msg&lt;/code&gt;), that line will be automatically deleted whenever a commit is created in the future.&lt;/p&gt;
&lt;h2 id="verification"&gt;Verification
&lt;/h2&gt;&lt;p&gt;Now go back to the Source Control panel and try creating a commit after a simple modification (e.g., adding a comment).&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Check commit log&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git log -1
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If the &lt;code&gt;Co-Authored-by: GitHub Copilot&lt;/code&gt; text does not appear in the result, it is successful.&lt;/p&gt;
&lt;h2 id="summary"&gt;Summary
&lt;/h2&gt;&lt;p&gt;While it is good for development tools to provide convenience, commit messages are important records that represent a developer&amp;rsquo;s work history. To prevent unnecessary text from being mixed in, apply the above settings to create a cleaner Git management environment.&lt;/p&gt;</description></item></channel></rss>