{
  "id": 3460164,
  "title": "10 Git Commands You’ll Wish You Knew Earlier",
  "url": "https://urgent.news/2026/08/26/10-git-commands-youll-wish-you-knew-earlier",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-26T07:59:06.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/sylwia-lask/10-git-commands-youll-wish-you-knew-earlier-4fcp"
  },
  "original_language": "en",
  "account": "Do you know Git? Of course you do! Today, I've compiled a list of my favorite intermediate-level Git commands that I wish I'd discovered sooner in my career. These tips come from a tech lead who taught me most of them and later shared them with junior and mid-level developers. I've been meaning to write this article for months, but finally got motivated after seeing a similar post by @francistrdev. If you're new to Git, check out Francis's Git Gud! article first. However, if you're already comfortable with basic commands like add, commit, pull, and push, this article is for you. Let's dive into the commands!\n\n1. git merge vs git rebase\nThese two commands are often confused with each other, but they have distinct purposes and outcomes. Both are used to integrate histories from one branch into another, typically updating a feature branch with changes from a main or develop branch.\n\nMerge: When you run git merge main while on the feature branch, Git combines both histories, creating a merge commit (M) that preserves the original history. While this approach maintains the real history, it can result in a tangled, \"spaghetti-like\" history if merged frequently.\n\nRebase: Instead, running git rebase main moves your commits (D and E) onto the latest main branch and reapplies them on top, resulting in a cleaner, linear history. However, this creates new commits with different hashes, effectively rewriting history. This should be done with caution, as rebasing shared history can confuse other developers working on the same branch. Conflicts can arise during both merge and rebase processes, but rebase can be more annoying since Git reapplies commits one by one, potentially causing multiple conflicts. If things go wrong, you can abort the operation using git merge --abort or git rebase --abort.",
  "summary": "Do you know Git? Of course you do! Today, I’ve got a few of my favorite Git commands for you. When I was a junior developer, my tech lead taught me most of them (hi Wojtek, if you’re reading this 👋) and later, I started teaching the same commands to my own junior and mid-level developers. I’ve actually been meaning to write this article for months. But you know how it is. It’s evergreen content,…",
  "key_points": [
    "git merge vs git rebase are distinct commands for integrating branch histories",
    "git rebase creates new commits with different hashes, potentially confusing other developers"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}