Re: Parent(s) commit in gerrit

871 views
Skip to first unread message

Alex Blewitt

unread,
Apr 26, 2013, 3:32:05 AM4/26/13
to mrutyunj...@gmail.com, repo-d...@googlegroups.com
On 26 Apr 2013, at 06:56, mrutyunj...@gmail.com wrote:


Parent(s)
ce8c7caca24c1d771bdd31d4be822c9aCommit message


My question is very basic and it might looks like silly. But yes i want to know how how gerrit decides the parent (s) commit for any new change uploaded on gerrit ? Also Why I need to rebase ONLY some of my changes before i merge them? 

Each Git commit has zero or more parent commits; it's a fundamental property of the repository structure. For any commit that isn't an initial commit there will always be one parent. So gerrit is showing you that value. 

If you do a git log --format=raw I think it shows the parents in the commit object. 

I am not sure of your second question: but if you have "fast forward only" in your repository then you will need to rebase when another commit has occurred on the repository branch in the time between when you have made your commit. So if you have a->b and a->c, only one of b and c can be pushed; the other will need rebasing (a->b->c')

Alex

Saša Živkov

unread,
Apr 26, 2013, 3:36:59 AM4/26/13
to mrutyunj...@gmail.com, repo-d...@googlegroups.com
On Fri, Apr 26, 2013 at 7:56 AM, <mrutyunj...@gmail.com> wrote:

Parent(s)
ce8c7caca24c1d771bdd31d4be822c9aCommit message


My question is very basic and it might looks like silly. But yes i want to know how how gerrit decides the parent (s) commit for any new change uploaded on gerrit ?
The parent commit for any commit is the same as in your local Git repository.
Git commits are immutable, including the parent commit property.

Also Why I need to rebase ONLY some of my changes before i merge them? 
Maybe because there were merge conflicts and Gerrit advises you to resolve them
(by performing the rebase)?
 

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
 
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages