Wireshark-dev: Re: [Wireshark-dev] Sample command line workflow with git and gerrit

From: Bálint Réczey <balint@xxxxxxxxxxxxxxx>
Date: Wed, 26 Feb 2014 21:56:03 +0100
Hi Evan,

2014-02-26 20:36 GMT+01:00 Evan Huus <eapache@xxxxxxxxx>:
> For a quick introduction to git concepts I found Git for Computer
> Scientists [1] to also be quite helpful. It assumes you have a basic
> working knowledge of things like Directed Acyclic Graphs but it gives
> a good understanding of the underlying algorithms and is much shorter
> than Pro Git.
>
> [1] http://eagain.net/articles/git-for-computer-scientists/
This is a nice and "brief intro" to  git, but to actually work with git you
need some explanation like [4] with properly put example commands.

[4] http://git-scm.com/book/en/Git-Basics-Undoing-Things

Cheers,
Balint

>
> On Wed, Feb 26, 2014 at 2:31 PM, Bálint Réczey <balint@xxxxxxxxxxxxxxx> wrote:
>> 2014-02-26 10:30 GMT+01:00 Joerg Mayer <jmayer@xxxxxxxxx>:
>>> On Wed, Feb 26, 2014 at 09:51:13AM +0100, Joerg Mayer wrote:
>>>> I sent the sample workflow for two reasons:
>>>> 1) Receive feedback whether I did something "stupid" (aka newbie error)
>>>> 2) Start creating a little bit of help for newbies
>>>
>>> Attached a revised version on how I'd like to go forward. The quicker we
>>> have the workflows the less time consuming things are going to get for
>>> others :-)
>>>
>>> Ciao
>>>      Jörg
>>>
>>>
>>> This idea of the file is to collect example workflows to make
>>> it easier getting started with git/gerrit.
>> From my experience (giving trainings on git/gerrit and observing other
>> trainers and trainees) the most efficient way of learning Git + Gerrit based
>> collaboration is reading Pro Git [1] then the Gerrit intro [2] . This is what
>> is suggested by our WorkFlow page [3].
>>
>> Other means like trying to start with incomplete, examples-based
>> quick-intros gave early satisfaction and long struggling to many people
>> I could observe thanks to misunderstanding or not seeing the concepts
>> behind the commands.
>>
>> Please don't create traps for people less experienced with git/gerrit.
>>
>> Let me ask this question: After reading through [1] and [2] carefully which
>> question(s) arising during contributing to Wireshark remained not answered?
>> Those could be good additions to the Q&A section of [3].
>>
>> Thanks,
>> Balint
>>
>> [1] http://git-scm.com/book
>> [2] https://code.wireshark.org/review/Documentation/intro-quick.html
>> [3] http://wiki.wireshark.org/Development/Workflow
>>
>>
>>>
>>> Once we have covered the most important use cases this file should
>>> a) be moved to either wiki.wireshark.org or the wsdg
>>> b) be enhanced by linking to or including screenshots of the gerrit
>>>    GUI
>>>
>>> Please improve this file by adding
>>> - ideas to the toc
>>> - Filling in items from the toc
>>> - corrections/enhancements to existing examples
>>>
>>> TOC
>>> ===
>>> - Modify a file, submit change
>>> - TODO: Modify a file, submit change, change file then resubmit
>>> - TODO: Modify a file, submit change then drop the change
>>> - ....
>>>
>>> Modify a file
>>> =============
>>> - Create a new branch called 'newsupdate' (git checkout)
>>> - Modify ./NEWS (vi)
>>> - Check whether there are other changes (git status, optional)
>>> - Submit to the local git repository (git commit)
>>> - Submit the changes for review (git review)
>>> - Review and submit my own change (gerrit review)
>>>     ["Normal" users: Wait for this to happen]
>>> - Switch back to development master (git checkout)
>>> - Delete the development branch (git branch)
>>>
>>> jmayer@egg:~/work/wireshark/git(master)> git checkout -b newsupdate
>>> Switched to a new branch 'newsupdate'
>>> jmayer@egg:~/work/wireshark/git(newsupdate)> vi NEWS
>>> jmayer@egg:~/work/wireshark/git(newsupdate)> git status
>>> [...]
>>> #       modified:   NEWS
>>> [...]
>>> jmayer@egg:~/work/wireshark/git(newsupdate)> git commit -a
>>> [newsupdate c159b39] As long as the NEWS file is part of the source distribution it really needs to be updated every time the file docbook/release-notes.asciidoc get changed.
>>>  1 file changed, 65 insertions(+), 48 deletions(-)
>>> jmayer@egg:~/work/wireshark/git(newsupdate)> git review
>>> remote: Resolving deltas: 100% (2/2)
>>> remote: Processing changes: new: 1, refs: 1, done
>>> remote:
>>> remote: New Changes:
>>> remote:   https://code.wireshark.org/review/398
>>> remote:
>>> To ssh://jmayer@xxxxxxxxxxxxxxxxxx:29418/wireshark
>>>  * [new branch]      HEAD -> refs/publish/master/newsupdate
>>> jmayer@egg:~/work/wireshark/git(newsupdate)> gerrit review 398,1 --submit --code-review +2
>>> jmayer@egg:~/work/wireshark/git(newsupdate)> git checkout master
>>> Switched to branch 'master'
>>> jmayer@egg:~/work/wireshark/git(master)> git branch -D newsupdate
>>> Deleted branch newsupdate (was c159b39).
>>>
>>> --
>>> Joerg Mayer                                           <jmayer@xxxxxxxxx>
>>> We are stuck with technology when what we really want is just stuff that
>>> works. Some say that should read Microsoft instead of technology.
>>> ___________________________________________________________________________
>>> Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
>>> Archives:    http://www.wireshark.org/lists/wireshark-dev
>>> Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
>>>              mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe
>> ___________________________________________________________________________
>> Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
>> Archives:    http://www.wireshark.org/lists/wireshark-dev
>> Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
>>              mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe