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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:07:32+00:00 2026-06-18T05:07:32+00:00

We have a project where the files contain unfortunately long lines, with no possibility

  • 0

We have a project where the files contain unfortunately long lines, with no
possibility of shortening them. We could streamline our workflow significantly if
we could use git checkout --patch also with such files. This does not work since
if there is any change in the whole huge line, the line gets flagged as changed.

Usually, we inspect such changes using git diff --word-diff. Is there a possibility
to make checkout --patch work with similar format? Are there any other means to
work around our problem?

  • 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-18T05:07:33+00:00Added an answer on June 18, 2026 at 5:07 am

    After some trying around, I got this answer to work and figured out how to use it for your checkout. I made some additional changes to squelch a warning that would sometimes be printed and had to fix the argument parsing to be a bit more flexible. (Since this is originally a plumbing script where the arguments get pre-processed by the git core, this is not necessary in the original version).

    You can use this version of the file (raw file for save-link-as convenience) and copy it to somewhere in your PATH, as described in the linked answer. Be sure to also set its executable bit (chmod +x path/to/file) after downloading.

    Assuming you named the file git-add--interactive--words as suggested, you can use the following command to define an alias for it:

    git config --global alias.cop add--interactive--words --patch=checkout
    

    Now you can do something like:

    git cop HEAD~5 to do an interactive checkout of . (current dir) 5 commits ago, or
    git cop master -- docs/README to interactively check out docs/README from branch master

    You can call the alias anything you want, of course (I chose cop here for ‘c‘heck’o‘ut –‘p‘atch).

    I know this answer is really late so it’s possibly not applicable for you anymore, but this question has been on the unanswered list for so long that I just had to figure it out today — maybe it’ll help someone else 😉

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

Sidebar

Related Questions

We have the problem that we have the open project files in our SVN
I have a CUDA project. It consists of several .cpp files that contain my
I have a project that contains a number of DLL files that contain Form
I have a project with some folders which happen to contain source files with
I have a project that contains xml files. I also have an Ant build
I have a class library project which contains some content files configured with the
I have a WCF visual studio project, which contains many SVC files. Can I
I have a project containing files generated from a .g file (antlr 2.7.x). The
Is it possible to have multiple Qt project files in a single Eclipse project?
I have a project and two files in the project are named as query-structures.h

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.