Five Git Config Settings Every Dev Needs — DeepSeek Tips &…
    Neura MarketNeura Market/DeepSeek
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityDeepSeekDeepSeek
    CoPilotCoPilotStable DiffusionStable DiffusionMidjourneyMidjourney
    View All Directories
    OverviewRulesPromptsMCPsAgentsGamesBlogVideosGuidesCoursesCommunityTrending
    DeepSeekBlogFive Git Config Settings Every Dev Needs
    Back to Blog
    Five Git Config Settings Every Dev Needs
    git

    Five Git Config Settings Every Dev Needs

    Nick Taylor February 10, 2026
    0 views

    You've probably added some settings to your Git Configuration, but here are some you might not have...

    You've probably added some settings to your Git Configuration, but here are some you might not have configured. If you haven't set these up yet, you're doing more manual work than you need to.

    Rebase on pull instead of merge

    git config --global pull.rebase true
    

    Every time you pull without this, Git creates a merge commit. Do that a few times a day across a team and your git log turns into a mess of "Merge branch 'main' into main" entries that tell you nothing. With rebase, your commits stay on top of the latest changes and your history actually reads like a coherent timeline.

    Bonus: I do this a lot, g pull -r origin main (g is my shell alias for git) to keep my branch up to date with main. You can also add

    git config --global branch.main.rebase true
    

    and now I just do g pull origin main. Sure it's only two less characters, but one less thing for me to think about.

    Auto set upstream on push

    git config --global push.autoSetupRemote true
    

    You create a new branch, do your work, push, and Git hits you with this:

    fatal: The current branch my-branch has no upstream branch.
    To push the current branch and set the remote as upstream, use
    
        git push --set-upstream origin my-branch
    
    To have this happen automatically for branches without a tracking
    upstream, see 'push.autoSetupRemote' in 'git help config'.
    

    Every single time. This setting makes that whole thing go away. Git sets the upstream automatically on your first push to a new branch.

    Auto prune on fetch

    git config --global fetch.prune true
    

    Stale remote branches pile up silently. Someone merged and deleted their branch weeks ago, but your local still shows it when you run git branch -r. This cleans out those dead references every time you fetch so your branch list reflects what actually exists on the remote.

    I had this alias in my shell to prune local and remote branches.

    rmmerged() {
      git branch --merged | grep -Ev "(\*|master|main)" | xargs -n 1 git branch -d && git remote prune origin
    }
    

    Now, it's simplified to only pruning local branches since the fetch prune setting handles remote ones.

    rmmerged() {
      git branch --merged | grep -Ev "(\*|master|main)" | xargs -n 1 git branch -d
    }
    

    A better diff algorithm

    git config --global diff.algorithm histogram
    

    The default diff algorithm works, but histogram produces cleaner diffs when there are lots of similarly structured lines, think repeated return statements, closing braces, or blank lines. The default algorithm can get confused about which identical lines to match and produces diffs that interleave additions and deletions in ways that are hard to follow. Histogram handles that better. The bigger the file and the more repetitive the structure, the more noticeable the improvement. It's a drop-in upgrade with no downside.

    Here's a fictitious example since I had a hard time finding a good example in my own recent commits showing the difference.

    Myers Algorithm (Default)

    diff --git a/tmp/example_before.js b/tmp/example_after.js
    index 30d9ab3c..8ec95ef5 100644
    --- a/tmp/example_before.js
    +++ b/tmp/example_after.js
    @@ -8,15 +8,10 @@ function validateUser(user) {
        if (!user.name) {
          return { error: 'Name is required' };
        }
    -  return { valid: true };
    -}
    -
    -function processData(data) {
    -  const result = transform(data);
    -  if (!result) {
    -    return { error: 'Transform failed' };
    +  if (!user.id) {
    +    return { error: 'ID is required' };
        }
    -  return result;
    +  return { valid: true };
      }
    
      function validateProduct(product) {
    @@ -26,13 +21,28 @@ function validateProduct(product) {
        if (!product.price) {
          return { error: 'Price is required' };
        }
    +  if (!product.name) {
    +    return { error: 'Name is required' };
    +  }
        return { valid: true };
      }
    
    +function processData(data) {
    +  const result = transform(data);
    +  if (!result) {
    +    return { error: 'Transform failed' };
    +  }
    +  return result;
    +}
    +
      function saveToDatabase(item) {
        const connection = getConnection();
        if (!connection) {
          return { error: 'Database connection failed' };
        }
    +  const validated = validateItem(item);
    +  if (!validated) {
    +    return { error: 'Validation failed' };
    +  }
        return connection.save(item);
      }
    

    Histogram Algorithm

    diff --git a/tmp/example_before.js b/tmp/example_after.js
    index 30d9ab3c..8ec95ef5 100644
    --- a/tmp/example_before.js
    +++ b/tmp/example_after.js
    @@ -8,6 +8,22 @@ function validateUser(user) {
        if (!user.name) {
          return { error: 'Name is required' };
        }
    +  if (!user.id) {
    +    return { error: 'ID is required' };
    +  }
    +  return { valid: true };
    +}
    +
    +function validateProduct(product) {
    +  if (!product) {
    +    return { error: 'Product is required' };
    +  }
    +  if (!product.price) {
    +    return { error: 'Price is required' };
    +  }
    +  if (!product.name) {
    +    return { error: 'Name is required' };
    +  }
        return { valid: true };
      }
    
    @@ -19,20 +35,14 @@ function processData(data) {
        return result;
      }
    
    -function validateProduct(product) {
    -  if (!product) {
    -    return { error: 'Product is required' };
    -  }
    -  if (!product.price) {
    -    return { error: 'Price is required' };
    -  }
    -  return { valid: true };
    -}
    -
      function saveToDatabase(item) {
        const connection = getConnection();
        if (!connection) {
          return { error: 'Database connection failed' };
        }
    +  const validated = validateItem(item);
    +  if (!validated) {
    +    return { error: 'Validation failed' };
    +  }
        return connection.save(item);
      }
    

    Rerere

    git config --global rerere.enabled true
    

    Rerere stands for "reuse recorded resolution." When you resolve a merge conflict, Git remembers how you resolved it. The next time the same conflict comes up, Git applies your previous resolution automatically. If you've ever rebased a long-lived branch and had to resolve the same conflict over and over, this is the fix. It won't silently merge things for you in a way you can't review. It records your resolutions and replays them so you don't have to redo the same work.

    Want to see what you currently have set? Run git config --global --list and see what's missing.

    If you enjoy tips like this, I have a newsletter, OneTipAWeek.com. One developer tip a week. Short & valuable. That's it!

    If you want to stay in touch, all my socials are on nickyt.online.

    Until the next one!

    Photo by <a href="https://unsplash.com/@yancymin?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Yancy Min</a> on <a href="https://unsplash.com/photos/a-close-up-of-a-text-description-on-a-computer-screen-842ofHC6MaI?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>

    Tags

    git

    Comments

    More Blog

    View all
    Five Gemma-4 models, one accelerator: what porting E2B 31B to AWS Inferentia2 taught megemma

    Five Gemma-4 models, one accelerator: what porting E2B 31B to AWS Inferentia2 taught me

    I ported the whole Gemma-4 family — E2B, E4B, 12B, 31B, and the 26B-A4B MoE — to run on...

    X
    xbill
    Hey DEV, I'm Tobore. Let's actually connect.community

    Hey DEV, I'm Tobore. Let's actually connect.

    Hey DEV, I'm Tobore. Let's actually connect. I've been on here for a while now, mostly writing and...

    L
    Laurina Ayarah
    I burned through thousands of AI tokens. Then a friend did it for freeai

    I burned through thousands of AI tokens. Then a friend did it for free

    (yep, kinda clickbait, just for the funsies 😊) At the beginning of the year, I relaunched my...

    P
    Paulo Henrique
    Claude might be saturating your machineai

    Claude might be saturating your machine

    My laptop was sitting idle with the fan at full tilt. Nothing was running that I knew of. The culprit...

    S
    Sidhant Panda
    Automated GitHub Code Reviews Using Google Geminigithubactions

    Automated GitHub Code Reviews Using Google Gemini

    I Built a Thing! TL;DR — Google Gemini-based Pull Request reviews and Issue Triaging for...

    D
    Darren "Dazbo" Lester
    What is an "agentic harness," actually?ai

    What is an "agentic harness," actually?

    I've been hearing the word "harness" thrown around a lot lately. I assumed it just meant "the IDE" or...

    T
    Tilde A. Thurium

    Stay up to date

    Get the latest DeepSeek prompts, rules, and resources delivered to your inbox weekly.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for DeepSeek and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Guides

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.

    Neura Market

    Custom AI Systems & Services

    Our team of experienced AI builders will help build custom AI systems, workflows, and solutions for your business.

    Request custom work

    Ready-made automations for this

    Workflows from the Neura Market marketplace related to this DeepSeek resource

    • Automate Blog Content Creation with Notion MCP, DeepSeek AI, and WordPressn8n · $9.99 · Related topic
    • Deploy a Customizable AI Chatbot with DeepSeek Integration on Your Websiten8n · $4.99 · Related topic
    • Generate AI Videos from Scripts with DeepSeek, Synthesia, and Together.ain8n · $24.99 · Related topic
    • Compare Multi-Period Financial Data from Google Sheets with DeepSeek AI Analysisn8n · $14.99 · Related topic
    Browse all workflows