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

  • SEARCH
  • Home
  • 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 8387049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:06:39+00:00 2026-06-09T18:06:39+00:00

Which one should one use to hide microcommits? Is the only difference between git

  • 0

Which one should one use to hide microcommits?

Is the only difference between git merge --squash and git merge --no-ff --no-commit the denial of the other parents?

  • 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-09T18:06:41+00:00Added an answer on June 9, 2026 at 6:06 pm

    The differences

    These options exists for separate purposes. Your repository ends up differently.

    Let’s suppose that your repository is like this after you are done developing on the topic branch:

    enter image description here


    --squash

    If you checkout master and then git merge --squash topic; git commit -m topic, you get this:

    enter image description here


    --no-ff --no-commit

    Instead, if you do git merge --no-ff --no-commit; git commit -m topic, you get this:

    enter image description here

    Hiding micro-commits

    If you really want to hide (I mean delete from your repository) your micro-commits, use --squash. Because, as you can see in the above images, you are not really hiding your micro-commits if you do not squash. Moreover, you do not usually push your topic branches to the world. Topic branches are for topic to get mature.

    If you want your history to have all your micro-commits, but leave them in another line of development (the green line in the above images), use --no-ff --no-commit. But please remember that a) this is not a branch, and b) does not really mean anything in Git because it is just another parent of your commit.

    Please refer to Git Branching – What a Branch Is if you really want to understand.

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

Sidebar

Related Questions

What are the differences between these two, and which one should I use? string
I'm a little confused as to which one I should use. I think either
What kind of arguments one should use when choosing between integration using web service
They are same, but which one should I use? http://docs.python.org/library/os.html : os.sep The character
My\Namespace \My\Namespace So, which one should I use, I see the php documentation uses
Which one should I use? http://reference.sitepoint.com/javascript/CharacterData/data http://reference.sitepoint.com/javascript/Node/nodeValue That site recommends using nodeValue yet shows
Which one should I use? catch (_com_error e) or catch (_com_error& e)
I notice there are two ObjectID in node-mongodb-native, which one should I use, if
Does it make a difference which one I use in objective-c (particularly on iOS)?
which one should be used to manipulating data, Array or Array Object? Like search,sort

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.