threads / discuss / 28182

Merging one file only

Subject: Merging one file only

## tl;dr

4 messages between Aug 21, 2011 and Aug 21, 2011.

replies: 3people: 3as markdown or json

Maïeul· Aug 21, 2011, 20:33 UTC · lore
Hello,
my problem is :
- I have 2 branches : "master" and "sty"
- In the branch sty, I have commit that i don't want to merge on the branch
master. The only file that I want merge are the *dtx files.

My question is : how can i do to merge *dtx files from "sty" to "master", and have log of commit on the *dtx ? Is it possible ?

Thank a lot !!

-- View this message in context: http://git.661346.n2.nabble.com/Merging-one-file-only-tp6709333p6709333.html Sent from the git mailing list archive at Nabble.com.

Michael Witten· Aug 21, 2011, 21:32 UTC · re: Maïeul · lore

Re: Merging one file only

On Sun, Aug 21, 2011 at 20:33, Maïeul <maieul@maieul.net> wrote:
Show 9 quoted lines
> Hello,
>
> my problem is :
> - I have 2 branches : "master" and "sty"
> - In the branch sty, I have commit that i don't want to merge on the branch
> master. The only file that I want merge are the *dtx files.
>
> My question is : how can i do to merge *dtx files from "sty" to "master",
> and have log of commit on the *dtx ? Is it possible ?
There are a number of ways to do this, some more general than others.

Do you know all of the names of the files for which you don't want associated commits? Do the files that you don't want get changed in some of the commits that you do want?

Maïeul Rouquette· Aug 21, 2011, 21:35 UTC · re: Michael Witten · lore

Re: Merging one file only

Le 21 août 2011 à 23:32, Michael Witten a écrit :
Show 16 quoted lines
> On Sun, Aug 21, 2011 at 20:33, Maïeul <maieul@maieul.net> wrote:
>> Hello,
>> 
>> my problem is :
>> - I have 2 branches : "master" and "sty"
>> - In the branch sty, I have commit that i don't want to merge on the branch
>> master. The only file that I want merge are the *dtx files.
>> 
>> My question is : how can i do to merge *dtx files from "sty" to "master",
>> and have log of commit on the *dtx ? Is it possible ?
> 
> There are a number of ways to do this, some more general than others.
> 
> Do you know all of the names of the files for which you don't want
> associated commits? Do the files that you don't want get changed in
> some of the commits that you do want?

I found the solution "git merge hashofcommit". My commits one the file are only on the file, so the solution is very simple ! Thank for helping :)-

PJ Weisberg· Aug 21, 2011, 21:52 UTC · re: Maïeul Rouquette · lore

Re: Merging one file only

On Sunday, August 21, 2011, Maïeul Rouquette <maieul@maieul.net> wrote:
Show 21 quoted lines
>
> Le 21 août 2011 à 23:32, Michael Witten a écrit :
>
>> On Sun, Aug 21, 2011 at 20:33, Maïeul <maieul@maieul.net> wrote:
>>> Hello,
>>>
>>> my problem is :
>>> - I have 2 branches : "master" and "sty"
>>> - In the branch sty, I have commit that i don't want to merge on the branch
>>> master. The only file that I want merge are the *dtx files.
>>>
>>> My question is : how can i do to merge *dtx files from "sty" to "master",
>>> and have log of commit on the *dtx ? Is it possible ?
>>
>> There are a number of ways to do this, some more general than others.
>>
>> Do you know all of the names of the files for which you don't want
>> associated commits? Do the files that you don't want get changed in
>> some of the commits that you do want?
> I found the solution "git merge hashofcommit". My commits one the file are only on the file, so the solution is very simple !
> Thank for helping :)-

Good if the commits you don't want come *after* the commits you do want.  Use "git cherry-pick <hash>" if you want one commit and *not* all the commits leading up to it.

← back to recent threads