[Development] Seeking advise using git and code review
André Hartmann
aha_1980 at gmx.de
Wed Oct 4 09:25:44 CEST 2017
Hi Daniel,
thanks for your first contribution.
Reading your message remembers me when I started learning Git and
contributing to Qt (Creator) some years back ...
The others already said very important things, so I'm just concentrating
on one:
> When checking the branch with "git branch", I found that I was on a
> detached head now.
That sounds like you didn't work on a local branch, but rather on the
remote branch. When commiting there, you go into detached head. But
that's no problem, it just needs special handling.
> I couldn't go back to the branch, because git told me that I would
> lose my changes.
Then you most likely have uncommited changes there. What does
git status
say?
Best regards,
André
Am 04.10.2017 um 08:55 schrieb Daniel Savi:
> Hello everybody
>
> I've just pushed my first commit to QtGui, trying to follow the
> contribution guidelines posted here
> http://wiki.qt.io/Qt_Contribution_Guidelines. Now I have some questions
> regarding the process. It seems that I have done it at least partly
> wrong ;-)
>
> The codereview to my changes is as follows:
> https://codereview.qt-project.org/#/c/207540/
>
> After pushing my changes, the sanity bot found some typos in my commit
> message. Now, how would I proceed? Do I change the commit message? If
> so, how would I do that?
>
> Another probably more serious problem: I've checked out the source for
> 5.10 and created a branch "myfix5.10" and used "git checkout myfix5.10".
> Then I mad a diff to my locally changed files in another directory and
> patched the files from 5.10 in a temporary folder. After checking that
> the patched files looked how they should, I copied them back to the
> original folder. Then I did a "git commit -a". When checking the branch
> with "git branch", I found that I was on a detached head now. I couldn't
> go back to the branch, because git told me that I would lose my changes.
> So I pushed them anyway. Now, my submit type in Gerrit is "cherry pick".
> What should I have done, when encountering the detached head state? Is
> the "cherry pick" type a problem?
>
> Third and last, I didn't know how to find reviewers so I picked some
> almost randomly from the git log and added the QtGui maintainer, too.
> Probably not such a good idea? How could I find reviewers for my changes
> to QTextDocumentWriter?
>
> Sorry for the lengthy post.
>
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
More information about the Development
mailing list