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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:19:46+00:00 2026-05-26T19:19:46+00:00

Sometimes I commit my changes and then suddenly remember that I forgot to add

  • 0

Sometimes I commit my changes and then suddenly remember that I forgot to add some comment or do some simple formatting, and having done that I do yet another commit. When it comes time to format a patch, I don’t want that “small changes” commit to become a separate patch. I want to take the last two commits and merge them to one patch as if they were a diff between current state and before I started committing.

Googling the issue didn’t help. How do I do this?

  • 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-26T19:19:47+00:00Added an answer on May 26, 2026 at 7:19 pm

    If you haven’t pushed your changes, use interactive git rebase and mark those commits as fixup:

    git rebase -i HEAD~5
    
    # opens editor with:
    pick  deadbeaf commit
    fixup abcd123  small change # edit this line to say "fixup", then save and exit editor
    pick  3133715  another commit
    

    Alternatively, if you discover you forgot some changes right after committing, add that change to the index and use git commit --amend to add it to your HEAD commit

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

Sidebar

Related Questions

If I'm not online, I sometimes want to package some changes to a commit,
I usually do this: git init git add . git commit . And then
Some of the users of my application complain that sometimes (in a random way)
Sometimes you're developing and you decide to commit, forgetting you created a few files
Sometimes I need to quickly extract some arbitrary data from XML files to put
Sometimes I have to work on code that moves the computer clock forward. In
Sometimes, in PL SQL you want to add a parameter to a Package, Function
I'm wondering, how could I avoid a commit in really small changes of code.
We are having a hard time keeping Subversion and FTP in-sync. Sometimes we forget
Sometimes I'm in a feature branch, but I've made an unrelated change that 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.