<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Workflow on Commentary of Takao</title><link>https://takao.blog/en/tags/workflow/</link><description>Recent content in Workflow on Commentary of Takao</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>Commentary of Takao</copyright><lastBuildDate>Sat, 13 Jun 2026 23:11:50 +0900</lastBuildDate><atom:link href="https://takao.blog/en/tags/workflow/index.xml" rel="self" type="application/rss+xml"/><item><title>Migrating from git checkout to git switch and restore</title><link>https://takao.blog/en/web/git-checkout-restore-switch-commands/</link><pubDate>Wed, 25 Mar 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/en/web/git-checkout-restore-switch-commands/</guid><description>&lt;img src="https://takao.blog/img/thumnail.webp" alt="Featured image of post Migrating from git checkout to git switch and restore" /&gt;&lt;p&gt;One of the very first commands developers learn when starting out with Git is &lt;code&gt;git checkout&lt;/code&gt;. However, &lt;code&gt;git checkout&lt;/code&gt; is a notoriously overloaded command. It handles too many responsibilities, making it a common source of confusion and accidental file loss for beginners and experienced developers alike.&lt;/p&gt;
&lt;p&gt;To solve this, Git version 2.23 (released in 2019) introduced two dedicated, task-focused alternatives: &lt;strong&gt;&lt;code&gt;git switch&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;git restore&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;In this post, we&amp;rsquo;ll discuss the design problems surrounding &lt;code&gt;git checkout&lt;/code&gt;, explain the roles of the newer commands, and show you how to transition to using them today.&lt;/p&gt;</description></item><item><title>Git Merge vs Git Rebase: Operational Guidelines</title><link>https://takao.blog/en/web/git-merge-vs-rebase-best-practice/</link><pubDate>Wed, 25 Feb 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/en/web/git-merge-vs-rebase-best-practice/</guid><description>&lt;img src="https://takao.blog/img/thumnail.webp" alt="Featured image of post Git Merge vs Git Rebase: Operational Guidelines" /&gt;&lt;p&gt;When integrating changes from one branch into another in Git, developers generally rely on two primary commands: &lt;code&gt;git merge&lt;/code&gt; and &lt;code&gt;git rebase&lt;/code&gt;. While both serve the same ultimate purpose—bringing code from two branches together—they approach the problem differently, resulting in vastly different commit histories.&lt;/p&gt;
&lt;p&gt;Understanding when and why to use each option is key to keeping your project&amp;rsquo;s repository clean, readable, and easy to debug.&lt;/p&gt;
&lt;p&gt;In this post, we will compare the mechanics, advantages, and drawbacks of &lt;code&gt;git merge&lt;/code&gt; and &lt;code&gt;git rebase&lt;/code&gt;, and outline a set of operational guidelines for teams.&lt;/p&gt;</description></item><item><title>Undoing Merge Commits Safely using git revert -m</title><link>https://takao.blog/en/web/git-revert-merge-commit-safe/</link><pubDate>Tue, 25 Nov 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/en/web/git-revert-merge-commit-safe/</guid><description>&lt;img src="https://takao.blog/img/thumnail.webp" alt="Featured image of post Undoing Merge Commits Safely using git revert -m" /&gt;&lt;p&gt;Directly after merging a feature branch into your primary release branch (&lt;code&gt;main&lt;/code&gt;), you might discover a severe bug that requires you to immediately roll back the integration.&lt;/p&gt;
&lt;p&gt;With standard commits, you can easily undo changes using &lt;code&gt;git revert &amp;lt;commit-hash&amp;gt;&lt;/code&gt;. However, attempting to revert a merge commit directly results in a Git error: &lt;code&gt;fatal: commit &amp;lt;hash&amp;gt; is a merge but no -m option was given.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;In this guide, we&amp;rsquo;ll explain why merge reverts require special handling, walk through using the &lt;code&gt;git revert -m&lt;/code&gt; option, and reveal the hidden trap of re-merging reverted features later.&lt;/p&gt;</description></item><item><title>Advanced git stash: Saving Untracked and Restoring Partially</title><link>https://takao.blog/en/web/git-stash-advanced-techniques/</link><pubDate>Wed, 20 Aug 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/en/web/git-stash-advanced-techniques/</guid><description>&lt;img src="https://takao.blog/img/thumnail.webp" alt="Featured image of post Advanced git stash: Saving Untracked and Restoring Partially" /&gt;&lt;h2 id="introduction"&gt;Introduction
&lt;/h2&gt;&lt;p&gt;In team development, you often need to switch branches to address an urgent bug fix while in the middle of writing code for a feature branch.&lt;/p&gt;
&lt;p&gt;While you can commit your half-finished work as a temporary &amp;ldquo;WIP&amp;rdquo; commit, a cleaner approach is to use &lt;strong&gt;&lt;code&gt;git stash&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This article covers advanced &lt;code&gt;git stash&lt;/code&gt; techniques, including saving untracked files, labeling stash items, and restoring specific files from a stash.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="1-the-basics-of-git-stash"&gt;1. The Basics of git stash
&lt;/h2&gt;&lt;p&gt;Let&amp;rsquo;s review the most common commands:&lt;/p&gt;</description></item><item><title>Using git worktree for Concurrent Branch Development</title><link>https://takao.blog/en/web/git-worktree-multi-branches/</link><pubDate>Tue, 20 May 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/en/web/git-worktree-multi-branches/</guid><description>&lt;img src="https://takao.blog/img/thumnail.webp" alt="Featured image of post Using git worktree for Concurrent Branch Development" /&gt;&lt;h2 id="introduction"&gt;Introduction
&lt;/h2&gt;&lt;p&gt;In daily software development, it is common to get interrupted by an urgent hotfix request while in the middle of writing code for a feature branch.&lt;/p&gt;
&lt;p&gt;Traditionally, developers handle this in one of two ways:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Temporarily shelf active changes using &lt;code&gt;git stash&lt;/code&gt;, switch branches to fix the bug, commit, switch back, and run &lt;code&gt;git stash pop&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Clone a completely separate copy of the repository into another directory to work on the hotfix.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;However, stash runs the risk of conflict errors on restore, and cloning multiple copies of the same repository wastes disk space and complicates local commit synchronization.&lt;/p&gt;</description></item><item><title>Safe Usecases of git cherry-pick for Specific Commits</title><link>https://takao.blog/en/web/git-cherry-pick-usecases/</link><pubDate>Tue, 25 Mar 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/en/web/git-cherry-pick-usecases/</guid><description>&lt;img src="https://takao.blog/img/thumnail.webp" alt="Featured image of post Safe Usecases of git cherry-pick for Specific Commits" /&gt;&lt;h2 id="introduction"&gt;Introduction
&lt;/h2&gt;&lt;p&gt;In team development, you often encounter situations where you need to deploy a specific bug fix from an ongoing feature branch to your production branch (&lt;code&gt;main&lt;/code&gt;) immediately, without releasing the half-finished feature itself.&lt;/p&gt;
&lt;p&gt;Merging the entire branch would pull in unfinished code.&lt;/p&gt;
&lt;p&gt;This is where the &lt;strong&gt;&lt;code&gt;git cherry-pick&lt;/code&gt;&lt;/strong&gt; command comes in handy. This article reviews how to safely apply individual commits to a target branch, handle conflicts during execution, and avoid common history pitfalls.&lt;/p&gt;</description></item><item><title>Cleaning Commit History with Interactive Git Rebase</title><link>https://takao.blog/en/web/git-rebase-interactive-flow/</link><pubDate>Thu, 20 Feb 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/en/web/git-rebase-interactive-flow/</guid><description>&lt;img src="https://takao.blog/img/thumnail.webp" alt="Featured image of post Cleaning Commit History with Interactive Git Rebase" /&gt;&lt;h2 id="introduction"&gt;Introduction
&lt;/h2&gt;&lt;p&gt;During daily software development, it is common to end up with a messy commit history full of logs like &amp;ldquo;WIP,&amp;rdquo; &amp;ldquo;fix typo,&amp;rdquo; or &amp;ldquo;testing deployment.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;If you merge these commits directly into your main branch, finding where a specific bug was introduced or understanding why a line of code was added becomes extremely difficult.&lt;/p&gt;
&lt;p&gt;Git&amp;rsquo;s &lt;strong&gt;interactive rebase (&lt;code&gt;git rebase -i&lt;/code&gt;)&lt;/strong&gt; allows you to clean up your commit history before creating a pull request. You can squash multiple commits into one, edit commit messages, reorder history, or delete redundant changes. This article covers the step-by-step workflow of utilizing interactive rebasing.&lt;/p&gt;</description></item></channel></rss>