Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8575803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:46:39+00:00 2026-06-11T19:46:39+00:00

According to the Github for Mac blog announcement , Once you’re ready to share

  • 0

According to the Github for Mac blog announcement,

Once you’re ready to share your commits, or pull in remote commits — just press the Sync Branch button. We’ll perform a smarter version of pull --rebase && push that reduces merge commits but doesn’t rewrite your merges.

What is “a smarter version” of pull --rebase && push? What exactly are they doing? Is it possible to do this “smarter” thing on the command line?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T19:46:40+00:00Added an answer on June 11, 2026 at 7:46 pm

    The blog post “Rebasing Merge Commits in Git” (from Glen Maddern) illustrates the danger of a git pull --rebase when you have made local merges:

    local merge

    If you do a git pull --rebase of master on top of origin/master now, you would delete your local merge.
    See the next picture after the rebase: no more merge commit.

    no more merge commit

    This is bad for a whole lot of reasons.

    • For one, the feature commits are actually duplicated, when really I only wanted to rebase the merge. If you later merge the feature branch in again, both commits will be in the history of master.
    • And origin/feature, which supposed to be finished and in master, is left dangling.
      Unlike the awesome history that you get from following a good branching/merging model, you’ve actually got misleading history.
      For example, if someone looks at the branches on origin, it’ll appear that origin/feature hasn’t been merged into master, even though it has! Which can cause all kinds of problems if that person then does a deploy. It’s just bad news all round.

    That is what Github for (Mac|Windows) would detect and avoid.

    If you didn’t detect it in time, the same blog post mentions the following recover:

    [master] git reset --hard origin/master
    HEAD is now at 9f3e34d sneaky extra commit
    [master] git merge --no-ff feature
    

    Actual Solution:

    You can achieve the desired result:

    desired result

    Instead of using git pull --rebase, use a git fetch origin and git rebase -p origin/master

    I suppose the “smarter version” of pull --rebase is that combination of “fetch + rebase preserving the merge”.

    Glen also proposes the following aliases to counter the fact that this sequence of command would no longer use the tracking information associated to a local branch.

    function git_current_branch() {
      git symbolic-ref HEAD 2> /dev/null | sed -e 's/refs\/heads\///'
    }
    
    alias gpthis='git push origin HEAD:$(git_current_branch)'
    alias grb='git rebase -p'
    alias gup='git fetch origin && grb origin/$(git_current_branch)'
    

    Jason Weathered posted a “http://jasoncodes.com/posts/gup-git-rebase“, but now refers to git-up, from Aanand Prasad.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm struggling with a strange issue. According to http://github.com/sinatra/sinatra (secion Filters) a response object
According to the documentation here: https://github.com/playframework/Play20/wiki/AssetsGoogleClosureCompiler it says: Any JavaScript file present in app/assets
I'm using gem rapns (https://github.com/ileitch/rapns) on my rails app. According to rapns doc, I
git config --global core.autocrlf input according to this github help page this should configure
According to https://github.com/technomancy/leiningen/blob/master/sample.project.clj I can attach a :init inside of a :repl-options. However, when
According to the documentation found in http://ask.github.com/celery/userguide/routing.html#manual-routing i can pass a queue parameter to
I've been trying to build live555 according to this guide: https://github.com/boltonli/ohbee/tree/master/android/streamer/jni as well as
According to the GitHub, If the app is running in a version of iOS
I installed rbenv according to the github directions. I am running OSX but I
I'm going according to the documentation at https://github.com/felixge/node-airbrake But when I try it, I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.