On Wed, Mar 02, 2022 at 09:24:56AM -0800, skybuck2000 wrote:
> So suppose I have a repo which is like this:
>
> version1.txt
> version2.txt
> version3.txt
>
> All three files are actually the same file.
>
> Is it possible to tell git that version3.txt was based on version2.txt and
> version2.txt was based on version1.txt and that it should apply it's
> difference engine onto it ?
There's no such support built into Git (because this simply goes perpendicular
to its data model, where multiple versions are recorded for the same file
(well, actually, they are recorded across the content of all the files in the
project, but let's not digress)) but you can use Git's command to do what
you're after:
- `git diff` can work on files.
- `git apply` and `git am` can be used to apply what `git diff` generates -
this is called "unified diff format" - to the specified file(s).
But in general this is not a task specifically for Git - the venerable tools
`diff` and `patch` predate Git by at least two decades, I think.
--
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/git-users/20220303154034.smmw5q4hrhoovvbk%40carbon.