[git-users] Re: how to to check if a branch has changes not present in master?

2012-08-28 Thread Tim Chase
On 08/28/12 03:13, Fred wrote:
> is there a way to check if a branch doesn't introduce changes,
> which are not in master.

I'm partial to

  git diff my_branch ^master

which would find all the changes on "my_branch" that aren't yet on
master.  This is an open syntax so you can request "changes that are
on my_branch_a, but aren't on master or on my_branch_b" with

  git diff my_branch_a ^my_branch_b ^master

-tkc



-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] Re: how to to check if a branch has changes not present in master?

2012-08-28 Thread Tim Chase
On 08/28/12 05:47, Tim Chase wrote:
> On 08/28/12 03:13, Fred wrote:
>> is there a way to check if a branch doesn't introduce changes,
>> which are not in master.
> 
> I'm partial to
> 
>   git diff my_branch ^master
> 
> which would find all the changes on "my_branch" that aren't yet on
> master.  This is an open syntax so you can request "changes that are
> on my_branch_a, but aren't on master or on my_branch_b" with
> 
>   git diff my_branch_a ^my_branch_b ^master

Additionally, I find the "diff" version somewhat hard to read unless
the delta is small, but the same syntax works for log:

  git log my_branch ^master ^my_branch_b

which can give you a higher level view of the changes.

-tkc


-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] Re: how to to check if a branch has changes not present in master?

2012-08-28 Thread Fred


On Tuesday, August 28, 2012 1:15:08 PM UTC+2, Tim Chase wrote:
>
> On 08/28/12 05:47, Tim Chase wrote: 
> > On 08/28/12 03:13, Fred wrote: 
> >> is there a way to check if a branch doesn't introduce changes, 
> >> which are not in master. 
> > 
> > I'm partial to 
> > 
> >   git diff my_branch ^master 
> > 
> > which would find all the changes on "my_branch" that aren't yet on 
> > master.  This is an open syntax so you can request "changes that are 
> > on my_branch_a, but aren't on master or on my_branch_b" with 
> > 
> >   git diff my_branch_a ^my_branch_b ^master 
>
> Additionally, I find the "diff" version somewhat hard to read unless 
> the delta is small, but the same syntax works for log: 
>
>   git log my_branch ^master ^my_branch_b 
>
> which can give you a higher level view of the changes. 
>


Hm. Maybe I've explained it wrong way. Let's say, my_branch is in sync with 
master
I do commit in master, so the master is ahead of my_branch by one commit. 

git diff my_branch ^master  would show a diff for this last commit and that 
is not what I want. In that case it is ok master differs from my_branch.

What I want to detect is following:
my_branch is in sync with master. Then there are some or none commits in 
master and one commit into my_branch. 
I want identify the commit into my_branch, because the change is not in 
master 

Thanks for help!


> -tkc 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/git-users/-/GgdqxnD0yF8J.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: how to to check if a branch has changes not present in master?

2012-08-28 Thread Michael Wang
try git rev-list, following is an exmaple:

loveky@LOVEKY-PC ~/test/test (dev)
$ git log --oneline master
1874792 4
8ed7a1e 3
a224756 2
34b4b11 1

loveky@LOVEKY-PC ~/test/test (dev)
$ git log --oneline dev
fd0c922 5
a224756 2
34b4b11 1

loveky@LOVEKY-PC ~/test/test (dev)
$ git rev-list master..dev
fd0c9223561e9d034a4401bb7cf82aaeee19723b

2012/8/28 Fred 

>
>
> On Tuesday, August 28, 2012 1:15:08 PM UTC+2, Tim Chase wrote:
>>
>> On 08/28/12 05:47, Tim Chase wrote:
>> > On 08/28/12 03:13, Fred wrote:
>> >> is there a way to check if a branch doesn't introduce changes,
>> >> which are not in master.
>> >
>> > I'm partial to
>> >
>> >   git diff my_branch ^master
>> >
>> > which would find all the changes on "my_branch" that aren't yet on
>> > master.  This is an open syntax so you can request "changes that are
>> > on my_branch_a, but aren't on master or on my_branch_b" with
>> >
>> >   git diff my_branch_a ^my_branch_b ^master
>>
>> Additionally, I find the "diff" version somewhat hard to read unless
>> the delta is small, but the same syntax works for log:
>>
>>   git log my_branch ^master ^my_branch_b
>>
>> which can give you a higher level view of the changes.
>>
>
>
> Hm. Maybe I've explained it wrong way. Let's say, my_branch is in sync
> with master
> I do commit in master, so the master is ahead of my_branch by one commit.
>
> git diff my_branch ^master  would show a diff for this last commit and
> that is not what I want. In that case it is ok master differs from
> my_branch.
>
> What I want to detect is following:
> my_branch is in sync with master. Then there are some or none commits in
> master and one commit into my_branch.
> I want identify the commit into my_branch, because the change is not in
> master
>
> Thanks for help!
>
>
>> -tkc
>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Git for human beings" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/git-users/-/GgdqxnD0yF8J.
>
> To post to this group, send email to git-users@googlegroups.com.
> To unsubscribe from this group, send email to
> git-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/git-users?hl=en.
>



-- 
Michael Wang
Unix/Linux Admin | Software Configuration Management
MSN: ylzc...@gmail.com
Blog: http://loveky2012.blogspot.com
命由己作,福由心生;积善之家,必有余庆;

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: how to to check if a branch has changes not present in master?

2012-08-28 Thread Aneesh Bhasin
Hi..

On Tue, Aug 28, 2012 at 6:02 PM, Fred  wrote:
>
>
> On Tuesday, August 28, 2012 1:15:08 PM UTC+2, Tim Chase wrote:
>>
>> On 08/28/12 05:47, Tim Chase wrote:
>> > On 08/28/12 03:13, Fred wrote:
>> >> is there a way to check if a branch doesn't introduce changes,
>> >> which are not in master.
>> >
>> > I'm partial to
>> >
>> >   git diff my_branch ^master
>> >
>> > which would find all the changes on "my_branch" that aren't yet on
>> > master.  This is an open syntax so you can request "changes that are
>> > on my_branch_a, but aren't on master or on my_branch_b" with
>> >
>> >   git diff my_branch_a ^my_branch_b ^master
>>
>> Additionally, I find the "diff" version somewhat hard to read unless
>> the delta is small, but the same syntax works for log:
>>
>>   git log my_branch ^master ^my_branch_b
>>
>> which can give you a higher level view of the changes.
>
>
>
> Hm. Maybe I've explained it wrong way. Let's say, my_branch is in sync with
> master
> I do commit in master, so the master is ahead of my_branch by one commit.
>
> git diff my_branch ^master  would show a diff for this last commit and that
> is not what I want. In that case it is ok master differs from my_branch.
>
> What I want to detect is following:
> my_branch is in sync with master. Then there are some or none commits in
> master and one commit into my_branch.
> I want identify the commit into my_branch, because the change is not in
> master
>
> Thanks for help!

wouldn't 'git diff master...my_branch' (note three dots instead of
two) give what you want (or maybe its the other way round) ?

regards,
Aneesh

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: how to to check if a branch has changes not present in master?

2012-08-28 Thread Fred


On Tuesday, August 28, 2012 3:26:15 PM UTC+2, Michael Wang wrote:
>
> try git rev-list, following is an exmaple:
>
> loveky@LOVEKY-PC ~/test/test (dev)
> $ git log --oneline master
> 1874792 4
> 8ed7a1e 3
> a224756 2
> 34b4b11 1
>
> loveky@LOVEKY-PC ~/test/test (dev)
> $ git log --oneline dev
> fd0c922 5
> a224756 2
> 34b4b11 1
>
> loveky@LOVEKY-PC ~/test/test (dev)
> $ git rev-list master..dev
> fd0c9223561e9d034a4401bb7cf82aaeee19723b
>


git rev-list ist great, but it doesn't work for cherry picked commits

do a cherry-pick commit from branchB into master. git rev-list 
master..branchB would show sha1 of the commit in branchB. 
But the change itself is already in master (cherry-picked and has diffrent 
sha1)
 

>
> 2012/8/28 Fred >
>
>>
>>
>> On Tuesday, August 28, 2012 1:15:08 PM UTC+2, Tim Chase wrote:
>>>
>>> On 08/28/12 05:47, Tim Chase wrote: 
>>> > On 08/28/12 03:13, Fred wrote: 
>>> >> is there a way to check if a branch doesn't introduce changes, 
>>> >> which are not in master. 
>>> > 
>>> > I'm partial to 
>>> > 
>>> >   git diff my_branch ^master 
>>> > 
>>> > which would find all the changes on "my_branch" that aren't yet on 
>>> > master.  This is an open syntax so you can request "changes that are 
>>> > on my_branch_a, but aren't on master or on my_branch_b" with 
>>> > 
>>> >   git diff my_branch_a ^my_branch_b ^master 
>>>
>>> Additionally, I find the "diff" version somewhat hard to read unless 
>>> the delta is small, but the same syntax works for log: 
>>>
>>>   git log my_branch ^master ^my_branch_b 
>>>
>>> which can give you a higher level view of the changes. 
>>>
>>
>>
>> Hm. Maybe I've explained it wrong way. Let's say, my_branch is in sync 
>> with master
>> I do commit in master, so the master is ahead of my_branch by one commit. 
>>
>> git diff my_branch ^master  would show a diff for this last commit and 
>> that is not what I want. In that case it is ok master differs from 
>> my_branch.
>>
>> What I want to detect is following:
>> my_branch is in sync with master. Then there are some or none commits in 
>> master and one commit into my_branch. 
>> I want identify the commit into my_branch, because the change is not in 
>> master 
>>
>> Thanks for help!
>>
>>
>>> -tkc 
>>>
>>>
>>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Git for human beings" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/git-users/-/GgdqxnD0yF8J.
>>
>> To post to this group, send email to git-...@googlegroups.com
>> .
>> To unsubscribe from this group, send email to 
>> git-users+...@googlegroups.com .
>> For more options, visit this group at 
>> http://groups.google.com/group/git-users?hl=en.
>>
>
>
>
> -- 
> Michael Wang
> Unix/Linux Admin | Software Configuration Management
> MSN: ylz...@gmail.com 
> Blog: http://loveky2012.blogspot.com 
> 命由己作,福由心生;积善之家,必有余庆;
>
> 

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/git-users/-/D8HhGyrU0sgJ.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: how to to check if a branch has changes not present in master?

2012-08-28 Thread Donovan Bray
git diff master..

Would give you what's in your current branch since master

git diff ..master

Would show you commits in master that your local branch doesn't have

git diff ...master

Or

git diff master...

Would show you all commits that your branch and master do not share

I only find the 3 dot version useful for identifying that two branches are 
entirely equal. 

On Aug 28, 2012, at 6:28 AM, Aneesh Bhasin  wrote:

> Hi..
> 
> On Tue, Aug 28, 2012 at 6:02 PM, Fred  wrote:
>> 
>> 
>> On Tuesday, August 28, 2012 1:15:08 PM UTC+2, Tim Chase wrote:
>>> 
>>> On 08/28/12 05:47, Tim Chase wrote:
 On 08/28/12 03:13, Fred wrote:
> is there a way to check if a branch doesn't introduce changes,
> which are not in master.
 
 I'm partial to
 
  git diff my_branch ^master
 
 which would find all the changes on "my_branch" that aren't yet on
 master.  This is an open syntax so you can request "changes that are
 on my_branch_a, but aren't on master or on my_branch_b" with
 
  git diff my_branch_a ^my_branch_b ^master
>>> 
>>> Additionally, I find the "diff" version somewhat hard to read unless
>>> the delta is small, but the same syntax works for log:
>>> 
>>>  git log my_branch ^master ^my_branch_b
>>> 
>>> which can give you a higher level view of the changes.
>> 
>> 
>> 
>> Hm. Maybe I've explained it wrong way. Let's say, my_branch is in sync with
>> master
>> I do commit in master, so the master is ahead of my_branch by one commit.
>> 
>> git diff my_branch ^master  would show a diff for this last commit and that
>> is not what I want. In that case it is ok master differs from my_branch.
>> 
>> What I want to detect is following:
>> my_branch is in sync with master. Then there are some or none commits in
>> master and one commit into my_branch.
>> I want identify the commit into my_branch, because the change is not in
>> master
>> 
>> Thanks for help!
> 
> wouldn't 'git diff master...my_branch' (note three dots instead of
> two) give what you want (or maybe its the other way round) ?
> 
> regards,
> Aneesh
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Git for human beings" group.
> To post to this group, send email to git-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> git-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/git-users?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: how to to check if a branch has changes not present in master?

2012-08-28 Thread Fred


On Tuesday, August 28, 2012 5:13:39 PM UTC+2, donnoman wrote:
>
> git diff master.. 
>
> Would give you what's in your current branch since master 
>
> git diff ..master 
>
> Would show you commits in master that your local branch doesn't have 
>
> git diff ...master 
>
> Or 
>
> git diff master... 
>
> Would show you all commits that your branch and master do not share 
>
> I only find the 3 dot version useful for identifying that two branches are 
> entirely equal. 
>

Looks like git diff master... is what I'm looking for. Thanks!

 
> On Aug 28, 2012, at 6:28 AM, Aneesh Bhasin 
> > 
> wrote: 
>
> > Hi.. 
> > 
> > On Tue, Aug 28, 2012 at 6:02 PM, Fred > 
> wrote: 
> >> 
> >> 
> >> On Tuesday, August 28, 2012 1:15:08 PM UTC+2, Tim Chase wrote: 
> >>> 
> >>> On 08/28/12 05:47, Tim Chase wrote: 
>  On 08/28/12 03:13, Fred wrote: 
> > is there a way to check if a branch doesn't introduce changes, 
> > which are not in master. 
>  
>  I'm partial to 
>  
>   git diff my_branch ^master 
>  
>  which would find all the changes on "my_branch" that aren't yet on 
>  master.  This is an open syntax so you can request "changes that are 
>  on my_branch_a, but aren't on master or on my_branch_b" with 
>  
>   git diff my_branch_a ^my_branch_b ^master 
> >>> 
> >>> Additionally, I find the "diff" version somewhat hard to read unless 
> >>> the delta is small, but the same syntax works for log: 
> >>> 
> >>>  git log my_branch ^master ^my_branch_b 
> >>> 
> >>> which can give you a higher level view of the changes. 
> >> 
> >> 
> >> 
> >> Hm. Maybe I've explained it wrong way. Let's say, my_branch is in sync 
> with 
> >> master 
> >> I do commit in master, so the master is ahead of my_branch by one 
> commit. 
> >> 
> >> git diff my_branch ^master  would show a diff for this last commit and 
> that 
> >> is not what I want. In that case it is ok master differs from 
> my_branch. 
> >> 
> >> What I want to detect is following: 
> >> my_branch is in sync with master. Then there are some or none commits 
> in 
> >> master and one commit into my_branch. 
> >> I want identify the commit into my_branch, because the change is not in 
> >> master 
> >> 
> >> Thanks for help! 
> > 
> > wouldn't 'git diff master...my_branch' (note three dots instead of 
> > two) give what you want (or maybe its the other way round) ? 
> > 
> > regards, 
> > Aneesh 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "Git for human beings" group. 
> > To post to this group, send email to git-...@googlegroups.com. 
>
> > To unsubscribe from this group, send email to 
> git-users+...@googlegroups.com . 
> > For more options, visit this group at 
> http://groups.google.com/group/git-users?hl=en. 
> > 
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/git-users/-/T5wqM1MIQOkJ.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: how to to check if a branch has changes not present in master?

2012-08-28 Thread Michael Wang
I have tried git diff master... which also have this issue, the
cherry-picked change is showing in the output.



2012/8/28 Fred 

>
>
> On Tuesday, August 28, 2012 3:26:15 PM UTC+2, Michael Wang wrote:
>>
>> try git rev-list, following is an exmaple:
>>
>> loveky@LOVEKY-PC ~/test/test (dev)
>> $ git log --oneline master
>> 1874792 4
>> 8ed7a1e 3
>> a224756 2
>> 34b4b11 1
>>
>> loveky@LOVEKY-PC ~/test/test (dev)
>> $ git log --oneline dev
>> fd0c922 5
>> a224756 2
>> 34b4b11 1
>>
>> loveky@LOVEKY-PC ~/test/test (dev)
>> $ git rev-list master..dev
>> fd0c9223561e9d034a4401bb7cf82a**aeee19723b
>>
>
>
> git rev-list ist great, but it doesn't work for cherry picked commits
>
> do a cherry-pick commit from branchB into master. git rev-list
> master..branchB would show sha1 of the commit in branchB.
> But the change itself is already in master (cherry-picked and has diffrent
> sha1)
>
>
>>
>> 2012/8/28 Fred 
>>
>>>
>>>
>>> On Tuesday, August 28, 2012 1:15:08 PM UTC+2, Tim Chase wrote:

 On 08/28/12 05:47, Tim Chase wrote:
 > On 08/28/12 03:13, Fred wrote:
 >> is there a way to check if a branch doesn't introduce changes,
 >> which are not in master.
 >
 > I'm partial to
 >
 >   git diff my_branch ^master
 >
 > which would find all the changes on "my_branch" that aren't yet on
 > master.  This is an open syntax so you can request "changes that are
 > on my_branch_a, but aren't on master or on my_branch_b" with
 >
 >   git diff my_branch_a ^my_branch_b ^master

 Additionally, I find the "diff" version somewhat hard to read unless
 the delta is small, but the same syntax works for log:

   git log my_branch ^master ^my_branch_b

 which can give you a higher level view of the changes.

>>>
>>>
>>> Hm. Maybe I've explained it wrong way. Let's say, my_branch is in sync
>>> with master
>>> I do commit in master, so the master is ahead of my_branch by one
>>> commit.
>>>
>>> git diff my_branch ^master  would show a diff for this last commit and
>>> that is not what I want. In that case it is ok master differs from
>>> my_branch.
>>>
>>> What I want to detect is following:
>>> my_branch is in sync with master. Then there are some or none commits in
>>> master and one commit into my_branch.
>>> I want identify the commit into my_branch, because the change is not in
>>> master
>>>
>>> Thanks for help!
>>>
>>>
 -tkc


  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Git for human beings" group.
>>> To view this discussion on the web visit https://groups.google.com/d/**
>>> msg/git-users/-/GgdqxnD0yF8J
>>> .
>>>
>>> To post to this group, send email to git-...@googlegroups.com.
>>> To unsubscribe from this group, send email to git-users+...@**
>>> googlegroups.com.
>>>
>>> For more options, visit this group at http://groups.google.com/**
>>> group/git-users?hl=en .
>>>
>>
>>
>>
>> --
>> Michael Wang
>> Unix/Linux Admin | Software Configuration Management
>> MSN: ylz...@gmail.com
>> Blog: http://loveky2012.**blogspot.com 
>> 命由己作,福由心生;积善之家,必有余庆;
>>
>>   --
> You received this message because you are subscribed to the Google Groups
> "Git for human beings" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/git-users/-/D8HhGyrU0sgJ.
>
> To post to this group, send email to git-users@googlegroups.com.
> To unsubscribe from this group, send email to
> git-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/git-users?hl=en.
>



-- 
Michael Wang
Unix/Linux Admin | Software Configuration Management
MSN: ylzc...@gmail.com
Blog: http://loveky2012.blogspot.com
命由己作,福由心生;积善之家,必有余庆;

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: how to to check if a branch has changes not present in master?

2012-08-29 Thread Fred


On Wednesday, August 29, 2012 4:11:23 AM UTC+2, Michael Wang wrote:
>
> I have tried git diff master... which also have this issue, the 
> cherry-picked change is showing in the output.


You are right. that's because the way it works. it finds last commit in 
master where branchB was forked and than does diff. since cherry-pick was 
later,
it is not considered in diff. simple git diff master..branchB works in that 
case. I still wonder if there is a solution
 

>
>
>
> 2012/8/28 Fred >
>
>>
>>
>> On Tuesday, August 28, 2012 3:26:15 PM UTC+2, Michael Wang wrote:
>>>
>>> try git rev-list, following is an exmaple:
>>>
>>> loveky@LOVEKY-PC ~/test/test (dev)
>>> $ git log --oneline master
>>> 1874792 4
>>> 8ed7a1e 3
>>> a224756 2
>>> 34b4b11 1
>>>
>>> loveky@LOVEKY-PC ~/test/test (dev)
>>> $ git log --oneline dev
>>> fd0c922 5
>>> a224756 2
>>> 34b4b11 1
>>>
>>> loveky@LOVEKY-PC ~/test/test (dev)
>>> $ git rev-list master..dev
>>> fd0c9223561e9d034a4401bb7cf82a**aeee19723b
>>>
>>
>>
>> git rev-list ist great, but it doesn't work for cherry picked commits
>>
>> do a cherry-pick commit from branchB into master. git rev-list 
>> master..branchB would show sha1 of the commit in branchB. 
>> But the change itself is already in master (cherry-picked and has 
>> diffrent sha1)
>>  
>>
>>>
>>> 2012/8/28 Fred 
>>>


 On Tuesday, August 28, 2012 1:15:08 PM UTC+2, Tim Chase wrote:
>
> On 08/28/12 05:47, Tim Chase wrote: 
> > On 08/28/12 03:13, Fred wrote: 
> >> is there a way to check if a branch doesn't introduce changes, 
> >> which are not in master. 
> > 
> > I'm partial to 
> > 
> >   git diff my_branch ^master 
> > 
> > which would find all the changes on "my_branch" that aren't yet on 
> > master.  This is an open syntax so you can request "changes that are 
> > on my_branch_a, but aren't on master or on my_branch_b" with 
> > 
> >   git diff my_branch_a ^my_branch_b ^master 
>
> Additionally, I find the "diff" version somewhat hard to read unless 
> the delta is small, but the same syntax works for log: 
>
>   git log my_branch ^master ^my_branch_b 
>
> which can give you a higher level view of the changes. 
>


 Hm. Maybe I've explained it wrong way. Let's say, my_branch is in sync 
 with master
 I do commit in master, so the master is ahead of my_branch by one 
 commit. 

 git diff my_branch ^master  would show a diff for this last commit and 
 that is not what I want. In that case it is ok master differs from 
 my_branch.

 What I want to detect is following:
 my_branch is in sync with master. Then there are some or none commits 
 in master and one commit into my_branch. 
 I want identify the commit into my_branch, because the change is not in 
 master 

 Thanks for help!


> -tkc 
>
>
>  -- 
 You received this message because you are subscribed to the Google 
 Groups "Git for human beings" group.
 To view this discussion on the web visit https://groups.google.com/d/**
 msg/git-users/-/GgdqxnD0yF8J
 .

 To post to this group, send email to git-...@googlegroups.com.
 To unsubscribe from this group, send email to git-users+...@**
 googlegroups.com.

 For more options, visit this group at http://groups.google.com/**
 group/git-users?hl=en .

>>>
>>>
>>>
>>> -- 
>>> Michael Wang
>>> Unix/Linux Admin | Software Configuration Management
>>> MSN: ylz...@gmail.com
>>>  Blog: http://loveky2012.**blogspot.com 
>>> 命由己作,福由心生;积善之家,必有余庆;
>>>
>>>   -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Git for human beings" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/git-users/-/D8HhGyrU0sgJ.
>>
>> To post to this group, send email to git-...@googlegroups.com
>> .
>> To unsubscribe from this group, send email to 
>> git-users+...@googlegroups.com .
>> For more options, visit this group at 
>> http://groups.google.com/group/git-users?hl=en.
>>
>
>
>
> -- 
> Michael Wang
> Unix/Linux Admin | Software Configuration Management
> MSN: ylz...@gmail.com 
> Blog: http://loveky2012.blogspot.com 
> 命由己作,福由心生;积善之家,必有余庆;
>
> 

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/git-users/-/fAH-OYPkEWMJ.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: how to to check if a branch has changes not present in master?

2012-08-29 Thread Michael Haggerty
On 08/28/2012 04:51 PM, Fred wrote:
> git rev-list ist great, but it doesn't work for cherry picked commits
> 
> do a cherry-pick commit from branchB into master. git rev-list
> master..branchB would show sha1 of the commit in branchB.
> But the change itself is already in master (cherry-picked and has
> diffrent sha1)

Git does not keep track of cherry-picked commits in *any* formal way
(unlike, for example Subversion) [1] and therefore does not have the
information required to answer the question that you are asking.  This
is why git workflows are usually organized to avoid the need for
cherry-picking, for example by always merging forward from old branches
to new instead of vice versa.  In exchange for this limitation, git
gives much more robust merging and better history visualization tools
than Subversion.

Michael

[1]
http://softwareswirl.blogspot.de/2009/08/git-mercurial-and-bazaarsimplicity.html

-- 
Michael Haggerty
mhag...@alum.mit.edu
http://softwareswirl.blogspot.com/

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: how to to check if a branch has changes not present in master?

2012-08-29 Thread Fred


On Wednesday, August 29, 2012 2:21:54 PM UTC+2, Michael Haggerty wrote:
>
> On 08/28/2012 04:51 PM, Fred wrote: 
> > git rev-list ist great, but it doesn't work for cherry picked commits 
> > 
> > do a cherry-pick commit from branchB into master. git rev-list 
> > master..branchB would show sha1 of the commit in branchB. 
> > But the change itself is already in master (cherry-picked and has 
> > diffrent sha1) 
>
> Git does not keep track of cherry-picked commits in *any* formal way 
> (unlike, for example Subversion) [1] and therefore does not have the 
> information required to answer the question that you are asking.  This 
> is why git workflows are usually organized to avoid the need for 
> cherry-picking, for example by always merging forward from old branches 
> to new instead of vice versa.  In exchange for this limitation, git 
> gives much more robust merging and better history visualization tools 
> than Subversion. 
>

I agree Git gives me more advantages. That's why I'm using it :)

No one gives a warning about issues with cherry picking or I have missed 
it. That said, now I have a problem
 

>
> Michael 
>
> [1] 
>
> http://softwareswirl.blogspot.de/2009/08/git-mercurial-and-bazaarsimplicity.html
>  
>
> -- 
> Michael Haggerty 
> mha...@alum.mit.edu  
> http://softwareswirl.blogspot.com/ 
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/git-users/-/RaFRaKti0csJ.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.