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 8088951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:14:44+00:00 2026-06-05T19:14:44+00:00

if another developer branches out on branch DEVELOPER_A, and makes a lot of commits

  • 0

if another developer branches out on branch DEVELOPER_A, and makes a lot of commits on that branch, when he’s done, I want to merge his work onto master. but I don’t want all his small commits to show up on the master branch history, and only care about the last commit.
so is there a way to “squash ” his history on branch DEVELOPER_A when merging that branch?

I could get a patch on developer_A branch, and apply to master, but I’m afraid git will lose track of the fact that the result is merged from developer_A branch, and merely thinks that this is some independent change

Thanks
Yang

  • 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-05T19:14:46+00:00Added an answer on June 5, 2026 at 7:14 pm

    You can do this in several ways, but the most obvious is to use a squashed merge.

    git merge --squash <other_branch>
    git commit
    

    Note that git will pre-populate your merge commit message with the log messages from the squashed commits, but you are free to edit or delete the messages to suit yourself.

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

Sidebar

Related Questions

I'm tidying up another developer's work who seems to have done a shoddy job
Another developer has given me an algorithm that returns a series of strings that
I am reviewing another developer's code and he has written a lot of code
I'm using a custom role provider (written by another developer) that uses our active
Another developer created a stored procedure that is set up to run as a
I am hearing from another developer that an object is too expensive to instantiate
I work for a company that makes a web based tool. As part of
I get Already up-to-date messages when trying to merge one branch, 'feature_1', into another,
I'm working with another developer on an app. His part is basically a control
I was looking over some code that another developer wrote and found this: Private

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.