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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:38:56+00:00 2026-05-25T14:38:56+00:00

When I write the code in local, sometimes I commit the code that isn’t

  • 0

When I write the code in local, sometimes I commit the code that isn’t clean yet, or, with an ugly message as temporary revision.

However, when I want my code to merge with the others, I would like the only final snapshot that the other can see, (hidden the revisions that look ugly)

Ex.
I fork 0 to my local repository, I make change and test and commit with unclean code

0->1->2->3->4->5->6 (Final code)

when the others pull the code, is it possible to make other see only final state? and not see the tree from 1..5

I want users will see like

0——————->6

One way I can think of is making a patch file, but it not good enough if there is some file have to be deleted or create.

  • 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-05-25T14:38:56+00:00Added an answer on May 25, 2026 at 2:38 pm

    You can use reset --soft to squash multiple commits into a single new clean commit. With your branch at the final code with no staged changes you can do:

    git reset --soft <sha1-of-0>
    git commit
    

    When git commit prompts, give a clear commit message describing the complete changes being introduced.

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

Sidebar

Related Questions

If you had to write code that takes messages from a message queue and
Is it possible to write code in a Flex application that will only be
I need to write code that picks up PGP-encrypted files from an FTP location
I was trying to write code that would auto-close a Toplevel Tk window in
I'm trying to write code that will load an image from a resource, and
I'm trying to write some simple code that will return the directory for the
I am trying to write a program to check that some C source code
I want to write code that compiles conditionally and according to the following two
We are trying to write a code to mark table rows using html5 local
How do you write pseudo-code for parallel programming? Especially, how do you differentiate local

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.