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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:45:02+00:00 2026-06-15T08:45:02+00:00

Git has an excellent tool to stage (and later commit) only partial changes in

  • 0

Git has an excellent tool to stage (and later commit) only partial changes in a file. I am looking for kind of inverse option: to force git to stage and commit the whole file in one hunk: “I know that really the whole file has changed – do not try to do it in parts”

This option would be practical when a file has changed so much that only some whitespaces here and there are common between versions. As far as I understand, git tries always to stage the file still in hunks and uses the common (whitespace lines) as split points.

  • 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-15T08:45:02+00:00Added an answer on June 15, 2026 at 8:45 am

    git only stores complete files (at least from the front-end’s standpoint – the back-end object database will play some tricks with deltas for storage efficiency when it creates pack-files, but transactions to and from the object database are only in entire-file units). When you git add -p to “store” “partial changes”, what git is really doing is generating an entirely new file for you that only contains the changes you specify, and storing that entire file. Depending on your work flow, this is one of the things that is sometimes criticized about git, as you can in effect store files that have never really existed in the development process and have not been tested to make sure they compile and/or work correctly.

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

Sidebar

Related Questions

My .git file has grown to 229Mb and I wondering what the best way
Debian stable has git 1.5.6.5 which is missing the --ff-only options in git pull/git
Git has the cat-file command to inspect internal files, e.g. git cat-file blob 557db03
My routine on git has always been very simple: git add -A git commit
My git repository has ~2,000 commits. For educational purposes, I have been playing around
Assume my git repository has the following structure: /.git /Project /Project/SubProject-0 /Project/SubProject-1 /Project/SubProject-2 and
I am using git along with git flow . Here git flow has a
I've got a Git repository that has some files with DOS format ( \r\n
I have a git repo which has a few branches - there's the master
Github has the following recommendation for global git configuration ~/.gitconfig : [alias] # Is

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.