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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:27:22+00:00 2026-05-16T22:27:22+00:00

I was reading this (old) posting on GIT and read the following: By using

  • 0

I was reading this (old) posting on GIT and read the following:

  • By using git add --p, you can choose which patches from a file you want to include for checkin.

  • The result is that the index contains a version of the file which is not in your working copy.

My question is twofold:

  1. Is this still true?
  2. How do I bring the changes back in from index after I’ve done 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-16T22:27:22+00:00Added an answer on May 16, 2026 at 10:27 pm

    I think that you might be misunderstanding what git add -p does.

    git add -p is something which you can use if you have files modified in your working copy, but for which you only want to apply some of the difference from those files to your index. Thus, you wind up with something in your index which only contains some of the changes that you have in your working copy. It doesn’t have anything to do with a patch file; it just lets you choose parts of the difference between your working copy and HEAD to apply to the index.

    If you want to apply a patch file to your index and/or working copy, use git apply. By default this will just apply changes to your working copy, and you will have to add them to the index using git add; however, you can use --index to also add them to the index, or --cached to only add them to the index, without modifying the working copy.

    If you have a large number of patches to apply in a mailbox, you can use git am to apply a whole series of patches at once.

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

Sidebar

Related Questions

Can someone give me some advice on this? I am reading in an old
I am reading an Excel file using good old OleDBConnections and OleDBCommands. How do
After reading this old post from Clinton Begin (creator of iBatis) I really wonder
Reading this article http://support.microsoft.com/kb/813878 I have a question: Where can I get ipseccmd.exe for
After reading this article, it makes sense to rebase to gather changes from the
Reading this old but classic document Writing High-Performance Managed Applications - A Primer ,
I am trying to read an old .dat file byte by byte, and have
While reading this , I'm confused by the following examples: // Example 2: Explicit
In the code below I have a StreamReader reading from a network stream. This
Reading this page , it says: ...the URI in a PUT request identifies the

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.