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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:08:31+00:00 2026-05-16T02:08:31+00:00

How can I get git add -i to start up in patch mode directly

  • 0

How can I get “git add -i” to start up in patch mode directly without having to type “5” + Enter?

I know about “git add -p”, but it’s not the same as it doesn’t show me a list of files to select from first.

This is very annoying because I’d like to jump between “git add -i” and “git commit” very quickly to turn my dirty tree into some nice looking commits.

  • 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-16T02:08:32+00:00Added an answer on May 16, 2026 at 2:08 am

    It’s a fairly easy change on a perl file to make this happen. I would only recommend doing this if you don’t like the default git-add -p behavior of patching all files.

    Find your copy of git-add--interactive and open with your favorite editor. Go to the patch_update_cmd subroutine. In there, there is an if statement which tests $patch_mode. Remove the top part of the if statement or set it so that the conditional always evaluates to false. Save and test.

    An example of what I did to make this work follows.

    if (0) {
      @them = @mods;
    }
    else {
      @them = list_and_choose({ PROMPT => 'Patch update',
              HEADER => $status_head, },
            @mods);
    }
    

    Another possible point of change would be at the very bottom of the file. You can change $patch_mode to some false value after the if statement, the effect should be the same.

    Note you may have some issues if you’re using a package manager or something else similar which tracks installed packages, I’m not sure.

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

Sidebar

Related Questions

How can you get the CVS repo of MMIX to CVS/Git? I know how
I can get the file path with: (message (file-name-directory (or buffer-file-name load-file-name))) But if
I get git-status at ~/bin: # Untracked files: # (use git add <file>... to
I can't seem to get rid of untracked content in Git's submodules. Running git
Somebody already asked how you can get git to follow symlinks. There was an
Can get all triples with value null in specific field? All people with date_of_birth
We can get class Class object by 3 methods: MyClass.class obj.getClass Class.forName(className) I don't
I can get this to work: [<DllImport(user32.dll)>] extern bool GetClientRect(nativeint, RECT*) let getClientRect hwnd
You can get the nodes of the document object of an <iframe> with the
You can get underground processes by ps ux I am searching a way to

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.