<?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: dipak suryawanshi</title>
    <description>The latest articles on DEV Community by dipak suryawanshi (@dipak_suryawanshi_d17).</description>
    <link>https://dev.to/dipak_suryawanshi_d17</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4135297%2Fd71573df-05be-4dfa-9585-5e35310c7079.png</url>
      <title>DEV Community: dipak suryawanshi</title>
      <link>https://dev.to/dipak_suryawanshi_d17</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dipak_suryawanshi_d17"/>
    <language>en</language>
    <item>
      <title>Git Merge vs Rebase: Key Differences, Examples and When to Use Each</title>
      <dc:creator>dipak suryawanshi</dc:creator>
      <pubDate>Thu, 26 Nov 2026 09:57:18 +0000</pubDate>
      <link>https://dev.to/dipak_suryawanshi_d17/git-merge-vs-rebase-key-differences-examples-and-when-to-use-each-4jm9</link>
      <guid>https://dev.to/dipak_suryawanshi_d17/git-merge-vs-rebase-key-differences-examples-and-when-to-use-each-4jm9</guid>
      <description>&lt;p&gt;&lt;strong&gt;Git merge vs rebase comes down to one thing: the history you want to keep.&lt;/strong&gt; Both &lt;code&gt;git merge&lt;/code&gt; and &lt;code&gt;git rebase&lt;/code&gt; take the work from one branch and integrate it into another, and both produce the same final code. Merge joins two lines of development with a new merge commit and leaves every original commit untouched. Rebase replays your commits one by one on top of another branch, creating new commits and a straight-line history. The rule most teams follow: rebase your own unpublished work to keep it tidy, merge (or squash-merge) when bringing shared branches together, and never rebase commits other people already depend on.&lt;/p&gt;

&lt;p&gt;This guide walks through what each command actually does, with commands you can run, and covers the settings and safety nets that keep rebasing from going wrong. If you haven't connected Git to your hosting provider yet, start with our guide to &lt;a href="https://thekernelbrief.com/blog/how-to-generate-ssh-keys-ed25519" rel="noopener noreferrer"&gt;generating and using SSH keys&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Git rebase vs merge: the quick comparison
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;code&gt;git merge&lt;/code&gt;&lt;/th&gt;
&lt;th&gt;&lt;code&gt;git rebase&lt;/code&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;What it does&lt;/td&gt;
&lt;td&gt;Joins two branches with a new merge commit&lt;/td&gt;
&lt;td&gt;Replays your commits on top of another branch&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;History shape&lt;/td&gt;
&lt;td&gt;Branching, with merge commits&lt;/td&gt;
&lt;td&gt;Linear&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Existing commits&lt;/td&gt;
&lt;td&gt;Unchanged (same hashes)&lt;/td&gt;
&lt;td&gt;Rewritten (new hashes)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Safe on shared branches&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Conflicts&lt;/td&gt;
&lt;td&gt;Resolved once, in the merge commit&lt;/td&gt;
&lt;td&gt;May be resolved once per replayed commit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Force-push needed afterwards&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes, if the branch was already pushed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Undo&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;git revert -m 1&lt;/code&gt; or reset before pushing&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;git rebase --abort&lt;/code&gt;, or reset via &lt;code&gt;git reflog&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Best for&lt;/td&gt;
&lt;td&gt;Integrating shared or long-lived branches&lt;/td&gt;
&lt;td&gt;Updating and cleaning up your own feature branch&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Use &lt;code&gt;git merge&lt;/code&gt; when&lt;/strong&gt; the branch is shared with other people, you want the history to show exactly when work was integrated, or you are landing a finished feature into &lt;code&gt;main&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use &lt;code&gt;git rebase&lt;/code&gt; when&lt;/strong&gt; the branch is yours alone, you want to bring it up to date with &lt;code&gt;main&lt;/code&gt; without extra merge commits, or you want to tidy up commits before opening a pull request.&lt;/p&gt;

&lt;h2&gt;
  
  
  The starting point: two branches that diverged
&lt;/h2&gt;

&lt;p&gt;Imagine you branched &lt;code&gt;feature/login&lt;/code&gt; off &lt;code&gt;main&lt;/code&gt;, made two commits, and meanwhile a teammate added a commit to &lt;code&gt;main&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;          A---B   feature/login
         /
    o---o---C     main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both branches now contain work the other lacks. You have two ways to bring &lt;code&gt;feature/login&lt;/code&gt; up to date with &lt;code&gt;main&lt;/code&gt;, or to land it on &lt;code&gt;main&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How git merge works
&lt;/h2&gt;

&lt;p&gt;A merge finds the common ancestor of the two branches, combines the changes since that point, and records the result as a new commit with two parents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git switch feature/login
git merge main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;          A---B---M   feature/login
         /       /
    o---o-------C     main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Commits &lt;code&gt;A&lt;/code&gt; and &lt;code&gt;B&lt;/code&gt; keep their original hashes. The merge commit &lt;code&gt;M&lt;/code&gt; documents that the branches were joined, and when.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fast-forward vs. merge commit
&lt;/h3&gt;

&lt;p&gt;If the branch you're merging into hasn't moved since you branched, Git doesn't need a merge commit at all. It simply moves the branch pointer forward — a &lt;em&gt;fast-forward&lt;/em&gt;. According to the &lt;a href="https://git-scm.com/docs/merge-options" rel="noopener noreferrer"&gt;merge options documentation&lt;/a&gt;, Git fast-forwards when it can and creates a merge commit only when it can't. Two flags change that:&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;# Always create a merge commit, even if a fast-forward is possible&lt;/span&gt;
git merge --no-ff feature/login

&lt;span class="c"&gt;# Combine the branch's changes into the working tree and index,&lt;/span&gt;
&lt;span class="c"&gt;# then make ONE ordinary commit yourself (no merge commit, no branch link)&lt;/span&gt;
git merge --squash feature/login
git commit -m &lt;span class="s2"&gt;"Add login form with input validation"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;--no-ff&lt;/code&gt; is popular when you want each feature to appear as a visible unit in the history. &lt;code&gt;--squash&lt;/code&gt; is what "squash and merge" buttons on hosting platforms do conceptually: the whole branch becomes a single commit on &lt;code&gt;main&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Merge pros:&lt;/strong&gt; non-destructive, safe on shared branches, preserves the true timeline. &lt;strong&gt;Cons:&lt;/strong&gt; frequent "Merge branch 'main' into feature" commits can make &lt;code&gt;git log&lt;/code&gt; hard to read.&lt;/p&gt;

&lt;h2&gt;
  
  
  How git rebase works
&lt;/h2&gt;

&lt;p&gt;A rebase takes the patches introduced by your commits and reapplies them, in order, on top of a new base. The &lt;a href="https://git-scm.com/book/en/v2/Git-Branching-Rebasing" rel="noopener noreferrer"&gt;Pro Git book&lt;/a&gt; describes it as rewinding your branch to the target and replaying your work on top:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git switch feature/login
git rebase main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;              A'--B'   feature/login
             /
    o---o---C          main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;A'&lt;/code&gt; and &lt;code&gt;B'&lt;/code&gt; contain the same changes as &lt;code&gt;A&lt;/code&gt; and &lt;code&gt;B&lt;/code&gt;, but they are &lt;strong&gt;new commits with new hashes&lt;/strong&gt;, because their parent changed. Now &lt;code&gt;main&lt;/code&gt; can be fast-forwarded to include the feature with no 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 switch main
git merge feature/login   &lt;span class="c"&gt;# fast-forward&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The final files are identical to the merge approach; only the shape of the history differs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rebase pros:&lt;/strong&gt; a linear history that is easy to read, bisect and review. &lt;strong&gt;Cons:&lt;/strong&gt; it rewrites commits, which causes real problems if anyone else has those commits.&lt;/p&gt;

&lt;h2&gt;
  
  
  The golden rule of rebasing
&lt;/h2&gt;

&lt;p&gt;Pro Git boils the risk down to one rule: don't rebase commits that already exist outside your own repository if other people may have built work on top of them.&lt;/p&gt;

&lt;p&gt;When you rebase, Git abandons the old commits and creates new ones. If a teammate already pulled the old ones and built on them, their history and yours now disagree, and the next pull produces duplicated commits and confusing conflicts. In practice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Safe to rebase:&lt;/strong&gt; local commits you haven't pushed; your own feature branch, even if pushed for a pull request, as long as nobody else is committing to it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't rebase:&lt;/strong&gt; &lt;code&gt;main&lt;/code&gt;, &lt;code&gt;develop&lt;/code&gt;, release branches, or any branch others pull from.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The book's suggested compromise is to rebase local changes to clean them up before pushing, but never rebase anything you've pushed somewhere others use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical workflows and commands
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Keep a feature branch up to date
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git fetch origin
git switch feature/login
git rebase origin/main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Resolve conflicts during a rebase
&lt;/h3&gt;

&lt;p&gt;Because rebase replays commits individually, it can stop at each one that conflicts. The &lt;a href="https://git-scm.com/docs/git-rebase" rel="noopener noreferrer"&gt;git-rebase documentation&lt;/a&gt; provides these controls:&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;# fix the conflicted files, then:&lt;/span&gt;
git add path/to/file
git rebase --continue

git rebase --skip    &lt;span class="c"&gt;# drop the commit that's being applied and move on&lt;/span&gt;
git rebase --abort   &lt;span class="c"&gt;# give up and return the branch to where it started&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you hit the same conflict repeatedly, enabling &lt;code&gt;git config --global rerere.enabled true&lt;/code&gt; tells Git to remember how you resolved a conflict and reuse that resolution.&lt;/p&gt;

&lt;h3&gt;
  
  
  Clean up commits with interactive rebase
&lt;/h3&gt;

&lt;p&gt;Interactive mode opens a to-do list where each commit can be &lt;code&gt;pick&lt;/code&gt;ed, &lt;code&gt;reword&lt;/code&gt;ed, &lt;code&gt;edit&lt;/code&gt;ed, &lt;code&gt;squash&lt;/code&gt;ed or &lt;code&gt;fixup&lt;/code&gt;ed into the previous one, or &lt;code&gt;drop&lt;/code&gt;ped:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git rebase -i origin/main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A tidy habit is to create fix-up commits as you go and let Git place them automatically:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git commit --fixup=&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;commit-hash&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
git rebase -i --autosquash origin/main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Setting &lt;code&gt;rebase.autoSquash&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; makes &lt;code&gt;--autosquash&lt;/code&gt; the default for interactive rebases. If you work with stacked branches, &lt;code&gt;--update-refs&lt;/code&gt; (or &lt;code&gt;rebase.updateRefs=true&lt;/code&gt;) moves any other branches that point at the rebased commits so they don't get left behind.&lt;/p&gt;

&lt;h3&gt;
  
  
  Push a rebased branch safely
&lt;/h3&gt;

&lt;p&gt;A rebased branch no longer descends from what's on the remote, so a normal push is rejected. Avoid plain &lt;code&gt;--force&lt;/code&gt;, which overwrites whatever is there. Use a lease:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push --force-with-lease --force-if-includes origin feature/login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Per the &lt;a href="https://git-scm.com/docs/git-push.html" rel="noopener noreferrer"&gt;git-push documentation&lt;/a&gt;, &lt;code&gt;--force-with-lease&lt;/code&gt; only overwrites the remote branch if it still matches your remote-tracking ref. The docs warn that background fetches (some editors run them) can silently update that ref and defeat the check; &lt;code&gt;--force-if-includes&lt;/code&gt; closes that gap by also verifying that the remote tip is already part of your local branch's history. You can enable it by default with &lt;code&gt;git config --global push.useForceIfIncludes true&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fixing "You have divergent branches" on git pull
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;git pull&lt;/code&gt; is a fetch followed by an integration step. When both your local branch and its upstream have new commits, recent Git versions stop and print a hint asking how to reconcile them, listing three options:&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 pull.rebase &lt;span class="kc"&gt;false&lt;/span&gt;  &lt;span class="c"&gt;# merge&lt;/span&gt;
git config pull.rebase &lt;span class="kc"&gt;true&lt;/span&gt;   &lt;span class="c"&gt;# rebase&lt;/span&gt;
git config pull.ff only       &lt;span class="c"&gt;# fast-forward only&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add &lt;code&gt;--global&lt;/code&gt; to apply the choice everywhere. You can also decide per pull with &lt;code&gt;git pull --rebase&lt;/code&gt; or &lt;code&gt;git pull --no-rebase&lt;/code&gt;. For personal branches, &lt;code&gt;pull.rebase true&lt;/code&gt; avoids noisy merge commits; &lt;code&gt;pull.ff only&lt;/code&gt; is the most conservative, refusing to do anything except a fast-forward so you can choose deliberately each time. If you often pull with uncommitted changes, &lt;code&gt;git config --global rebase.autoStash true&lt;/code&gt; stashes and reapplies them around the rebase — though the docs note the final reapply can still conflict.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to undo a merge or rebase
&lt;/h2&gt;

&lt;p&gt;Mistakes are recoverable because Git keeps a reflog of where each branch has pointed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git reflog                       &lt;span class="c"&gt;# find the commit before the operation&lt;/span&gt;
git reset --hard feature/login@&lt;span class="o"&gt;{&lt;/span&gt;1&lt;span class="o"&gt;}&lt;/span&gt;   &lt;span class="c"&gt;# move the branch back one reflog step&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;--hard&lt;/code&gt; discards uncommitted changes, so commit or stash them first. For a merge you haven't pushed, &lt;code&gt;git reset --hard ORIG_HEAD&lt;/code&gt; usually works too. For a merge that's already on a shared branch, don't rewrite history — use &lt;code&gt;git revert -m 1 &amp;lt;merge-commit&amp;gt;&lt;/code&gt; to create a new commit that undoes it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which should you use?
&lt;/h2&gt;

&lt;p&gt;A sensible default for most teams:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Rebase&lt;/strong&gt; your feature branch onto &lt;code&gt;main&lt;/code&gt; while you work, and use interactive rebase to tidy commits before review.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Merge&lt;/strong&gt; the finished branch into &lt;code&gt;main&lt;/code&gt; through a pull request — with a merge commit, a squash, or a rebase-and-merge, according to your team's convention.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never rebase&lt;/strong&gt; shared branches, and force-push only with &lt;code&gt;--force-with-lease&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Whatever you choose, consistency matters more than the choice itself — agree on it once and encode it in your repository settings and &lt;code&gt;pull.rebase&lt;/code&gt; config. Just as a &lt;a href="https://thekernelbrief.com/blog/python-virtual-environments-venv-guide" rel="noopener noreferrer"&gt;Python virtual environment&lt;/a&gt; keeps project dependencies predictable, a shared Git convention keeps your project history predictable for everyone who reads it later.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is the difference between git merge and git rebase?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Both integrate changes from one branch into another and end with the same code. git merge creates a merge commit that ties the two histories together and keeps every existing commit unchanged. git rebase re-creates your commits on top of the other branch, giving a linear history but new commit hashes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is git rebase better than git merge?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Neither is better in general. Both end with the same code; they differ only in how history is recorded. Merge preserves exactly what happened, including when branches diverged. Rebase rewrites your commits to produce a linear history. Many teams rebase private feature branches and merge (or squash-merge) them into main.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can I rebase a branch I have already pushed?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Only if nobody else has based work on it, such as your own feature branch in a pull request. You will then need to force-push, and you should use git push --force-with-lease rather than --force. Never rebase shared branches like main.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Should I use git pull --rebase?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For your own branches it is a good default: it puts your local commits on top of the fetched ones instead of adding a merge commit every time you pull. Set it permanently with git config pull.rebase true. Use a normal merge pull (or pull.ff only) if you prefer never to rewrite local commits automatically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I undo a rebase?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;During a rebase, run git rebase --abort to return to where you started. After it has finished, find the previous branch tip with git reflog (or the branch@{1} syntax) and reset to it, for example git reset --hard feature@{1}. Make sure you have no uncommitted work first.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What does 'You have divergent branches and need to specify how to reconcile them' mean?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Your local branch and its upstream both have commits the other lacks, and Git wants you to choose a strategy. Run git pull --rebase or git pull --no-rebase once, or set pull.rebase (true or false) or pull.ff only in your Git config to make the choice permanent.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://thekernelbrief.com/blog/git-merge-vs-rebase-explained" rel="noopener noreferrer"&gt;KernelBrief&lt;/a&gt;, an independent technology publication.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>I Built a Native Windows GUI for Managing Linux Servers Over SSH</title>
      <dc:creator>dipak suryawanshi</dc:creator>
      <pubDate>Mon, 21 Sep 2026 08:23:17 +0000</pubDate>
      <link>https://dev.to/dipak_suryawanshi_d17/i-built-a-native-windows-gui-for-managing-linux-servers-over-ssh-5485</link>
      <guid>https://dev.to/dipak_suryawanshi_d17/i-built-a-native-windows-gui-for-managing-linux-servers-over-ssh-5485</guid>
      <description>&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fl9jb7ijds600ks6tmmqk.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fl9jb7ijds600ks6tmmqk.png" alt=" " width="799" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I kept running into the same problem when managing Linux servers from Windows.&lt;/p&gt;

&lt;p&gt;I would use one tool for SFTP, another for SSH, terminal commands for services and processes, and separate scripts for deployments.&lt;/p&gt;

&lt;p&gt;So I decided to build something that combines these workflows into one native Windows application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Meet LinuxDesk
&lt;/h2&gt;

&lt;p&gt;LinuxDesk is a Windows desktop application for managing Linux servers over SSH/SFTP.&lt;/p&gt;

&lt;p&gt;The main idea is simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If SSH already works, LinuxDesk works.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;There is no agent, daemon, web server, or additional software that needs to be installed on the Linux server.&lt;/p&gt;

&lt;h2&gt;
  
  
  What can it do?
&lt;/h2&gt;

&lt;p&gt;LinuxDesk currently provides:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;File browser and remote editor&lt;/li&gt;
&lt;li&gt;SSH/SFTP file management&lt;/li&gt;
&lt;li&gt;Service management&lt;/li&gt;
&lt;li&gt;Process management&lt;/li&gt;
&lt;li&gt;Log viewer&lt;/li&gt;
&lt;li&gt;System monitoring&lt;/li&gt;
&lt;li&gt;Application deployment&lt;/li&gt;
&lt;li&gt;Backup and rollback&lt;/li&gt;
&lt;li&gt;Deployment health checks&lt;/li&gt;
&lt;li&gt;Production safety confirmations&lt;/li&gt;
&lt;li&gt;Local audit logging&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The deployment workflow
&lt;/h2&gt;

&lt;p&gt;One part I wanted to do differently was deployment.&lt;/p&gt;

&lt;p&gt;Instead of simply uploading files and hoping everything works, LinuxDesk creates a reviewable deployment plan.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run pre-deployment hook&lt;/li&gt;
&lt;li&gt;Create backup&lt;/li&gt;
&lt;li&gt;Upload changed files&lt;/li&gt;
&lt;li&gt;Remove files marked for deletion&lt;/li&gt;
&lt;li&gt;Restart service&lt;/li&gt;
&lt;li&gt;Run health check&lt;/li&gt;
&lt;li&gt;Complete deployment&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;There is also a Dry Run mode so you can review what would happen without changing the server.&lt;/p&gt;

&lt;p&gt;Deployments can include HTTP, TCP, process, systemd, and command-based health checks, with rollback when a deployment fails its health check.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why JavaFX?
&lt;/h2&gt;

&lt;p&gt;LinuxDesk is built with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Java 21&lt;/li&gt;
&lt;li&gt;JavaFX&lt;/li&gt;
&lt;li&gt;Apache MINA SSHD&lt;/li&gt;
&lt;li&gt;BouncyCastle&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I wanted a native desktop application rather than an Electron-based application, while keeping the project in the Java ecosystem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why no server agent?
&lt;/h2&gt;

&lt;p&gt;This was an important design decision.&lt;/p&gt;

&lt;p&gt;I didn't want users to install and maintain another service on every Linux server just to manage it.&lt;/p&gt;

&lt;p&gt;SSH is already available on most Linux systems, so LinuxDesk uses that existing access instead.&lt;/p&gt;

&lt;p&gt;This also means there is no LinuxDesk daemon that needs to be patched or kept running.&lt;/p&gt;

&lt;h2&gt;
  
  
  Current limitations
&lt;/h2&gt;

&lt;p&gt;LinuxDesk is still an early release.&lt;/p&gt;

&lt;p&gt;Currently:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Windows only&lt;/li&gt;
&lt;li&gt;No MFA support yet&lt;/li&gt;
&lt;li&gt;No SSH-agent authentication yet&lt;/li&gt;
&lt;li&gt;No SSH certificate authentication yet&lt;/li&gt;
&lt;li&gt;Built-in terminal is not a full terminal emulator&lt;/li&gt;
&lt;li&gt;Interactive applications such as &lt;code&gt;vim&lt;/code&gt;, &lt;code&gt;top&lt;/code&gt;, and &lt;code&gt;less&lt;/code&gt; don't render correctly yet&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For those terminal workloads, a normal terminal is still the better option.&lt;/p&gt;

&lt;h2&gt;
  
  
  I'm looking for feedback
&lt;/h2&gt;

&lt;p&gt;I'm especially interested in hearing from developers, DevOps engineers, and sysadmins.&lt;/p&gt;

&lt;p&gt;If you manage Linux servers from Windows:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What would make a tool like this genuinely useful in your daily workflow?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Are there workflows that you think a GUI should handle but current SSH/SFTP tools don't?&lt;/p&gt;

&lt;p&gt;You can take a look at LinuxDesk here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://linuxdesk.netlify.app/" rel="noopener noreferrer"&gt;https://linuxdesk.netlify.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is an early project, so feedback on the architecture, workflow, and missing features is very welcome.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>linux</category>
      <category>java</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
