Re: [Wikitech-l] Git for idiots

2015-11-14 Thread Marcin Cieslak
On 2015-11-13, Purodha Blissenbach  wrote:
> Hi,
>
>> git clone 
>> ssh://review.openstack.org:29418/openstack-infra/git-review.git
>
> fatal: Could not read from remote repository.
>
> Please make sure you have the correct access rights
> and the repository exists.
>
> Greetings -- Purodha

You can use

 git clone https://review.openstack.org/openstack-infra/git-review.git

if you don't have an account on review.openstack.org with your SSH key

Saper


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2015-11-13 Thread Antoine Musso
Le 12/11/2015 17:35, C. Scott Ananian a écrit :
> Hashar: I think your criticisms of git-review might be out of date.  On my
> debian system, "sudo apt-get install git-review" was sufficient to install
> a version of git review which is adequate for all my needs (I have never
> noticed any of the "known issues" you mention).  And "git review -s" is a
> one-step way to set up the proper remotes and etc and leave you ready to
> use it.  I am in the habit of typing "git review -u" since I noticed that
> sometimes it doesn't update its remotes, but I'm guessing that's more habit
> than necessity.  None of the other steps you describe seem to be necessary.
>  --scott

Hello,

Yeah that was merely a rant about the state of git-review back when we
switched from svn to git.  I spent countless hours getting folks to set
it up properly :(

The Debian/Ubuntu packages nowadays provides sufficiently recent
versions and indeed apt-get install is probably the easiest way to get
it installed.

I am diverging, but I run it from HEAD which is something like:

---
git clone ssh://review.openstack.org:29418/openstack-infra/git-review.git
cd git-review
pip install --user --develop .

export PATH=$PATH:~/.local/bin
---

So whenever I checkout a new commit, the command points to the new code
base :-)

YMMV


-- 
Antoine "hashar" Musso


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2015-11-13 Thread Purodha Blissenbach

Hi,

git clone 
ssh://review.openstack.org:29418/openstack-infra/git-review.git


fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Greetings -- Purodha


On 13.11.2015 11:48, Antoine Musso wrote:

Le 12/11/2015 17:35, C. Scott Ananian a écrit :
Hashar: I think your criticisms of git-review might be out of date.  
On my
debian system, "sudo apt-get install git-review" was sufficient to 
install
a version of git review which is adequate for all my needs (I have 
never
noticed any of the "known issues" you mention).  And "git review -s" 
is a
one-step way to set up the proper remotes and etc and leave you 
ready to
use it.  I am in the habit of typing "git review -u" since I noticed 
that
sometimes it doesn't update its remotes, but I'm guessing that's 
more habit
than necessity.  None of the other steps you describe seem to be 
necessary.

 --scott


Hello,

Yeah that was merely a rant about the state of git-review back when 
we
switched from svn to git.  I spent countless hours getting folks to 
set

it up properly :(

The Debian/Ubuntu packages nowadays provides sufficiently recent
versions and indeed apt-get install is probably the easiest way to 
get

it installed.

I am diverging, but I run it from HEAD which is something like:

---
git clone 
ssh://review.openstack.org:29418/openstack-infra/git-review.git

cd git-review
pip install --user --develop .

export PATH=$PATH:~/.local/bin
---

So whenever I checkout a new commit, the command points to the new 
code

base :-)

YMMV



___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2015-11-13 Thread Antoine Musso
Le 13/11/2015 07:04, Gergo Tisza a écrit :
> On Thu, Nov 12, 2015 at 1:10 AM, Antoine Musso  wrote:
> 
>> On that last point, git-review 1.26 comes with a new option 'usepushurl'
>> which makes git-review reuse the origin repo and just set the push url
>> to the ssh:// url.  The 'gerrit' remote will no more be needed.
>>
>> Ie in your ~/.gitconfig :
>>
>>[gitreview]
>> usepushurl = 1
>>
> 
> It's not really new, on older versions you needed to set the name with the
> defaultremote parameter. (It's even included in the tutorial
> ,
> although I am not sure that's a good idea.) The problem is that the same
> setting cannot be used on vagrant, which needs an anonymous origin for
> automated (ie. passwordless) updates and an authenticated gerrit remote for
> pushes (T59680 ); and
> vagrant-based and other checkouts behaving differently will confuse the
> hell out of beginners. I would rather stick with cscott's recommendation to
> just run git review -u all the time.

The defaultremote is a different system. The git remote have two URLS:
one for fetching and another for pushing.  When the setting is enabled
git-review -s change the push URL to point to Gerrit while the fetch one
is left untouched (ie: kept anonymous).

Example using GitHub to fetch but push to Gerrit:


$ git clone https://github.com/wikimedia/cdb
Cloning into 'cdb'...
$ git-review -s
Adding a git push url to 'origin' that maps to:
 
ssh://has...@gerrit.wikimedia.org:29418/cdb.git
$ git remote -v
origin  https://github.com/wikimedia/cdb (fetch)
origin  ssh://has...@gerrit.wikimedia.org:29418/cdb.git (push)
$


We fetch from GitHub:

$ git fetch --verbose
From https://github.com/wikimedia/cdb
 = [up to date]  master -> origin/master

And push to Gerrit:

$ git push --verbose --dry-run
Pushing to ssh://has...@gerrit.wikimedia.org:29418/cdb.git
To ssh://has...@gerrit.wikimedia.org:29418/cdb.git
 = [up to date]  master -> master
Everything up-to-date


Profit \O/



> More importantly, I'm not sure it's worth to spend a lot of time on
> improving our gerrit documentation now that we are supposedly a few months
> away from ditching gerrit completely.

We can still tune it a bit when it makes senses. But yeah with
Differential that will be superseed even if phasing out Gerrit is more a
few quarters than a few months :-(


-- 
Antoine "hashar" Musso


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2015-11-12 Thread Antoine Musso
Le 12/11/2015 03:25, S Page a écrit :
> On Wed, Nov 11, 2015 at 12:50 AM, Petr Bena  wrote:
> 
>> > Ok, I will try to merge all useful stuff in here:
>> > https://www.mediawiki.org/wiki/Git_for_dummies
>> >
> The problem is these are matters of widely-varying taste and background.
> When I tried to clean up in early 2013, git experts didn't even agree on
> whether the gerrit remote should be origin, or whether people should use
> `git review` at all.

Hello,

git-review is a python utility that acts as a thin wrapper around Gerrit
workflow.  It has been written by the OpenStack community which is a
python shop.

It comes with few issues:

* the versions that comes with Linux distributions are fairly outdated
and comes with known issues.
* installing using the python package managers is not straightforward
and has several permissions issues depending on your operating system
(some install system wide which require root, others to a user writable
dir etc)
* old versions were pushing to the HEAD of the repo iirc which is
troublesome when you are working on another branch
* some global configuration is needed
* you need a remote named gerrit

On that last point, git-review 1.26 comes with a new option 'usepushurl'
which makes git-review reuse the origin repo and just set the push url
to the ssh:// url.  The 'gerrit' remote will no more be needed.

Ie in your ~/.gitconfig :

   [gitreview]
usepushurl = 1


What I did until that new version is that all my clones were done with a
remote named 'gerrit' (git clone -o gerrit ).

Since folks are tired of debugging python stacktraces and incorrect
git-review configuration, some are recommending to use the underlying
Gerrit workflow command:

 git push origin HEAD:refs/publish/[/]



-- 
Antoine "hashar" Musso


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2015-11-12 Thread Gergo Tisza
On Thu, Nov 12, 2015 at 1:10 AM, Antoine Musso  wrote:

> On that last point, git-review 1.26 comes with a new option 'usepushurl'
> which makes git-review reuse the origin repo and just set the push url
> to the ssh:// url.  The 'gerrit' remote will no more be needed.
>
> Ie in your ~/.gitconfig :
>
>[gitreview]
> usepushurl = 1
>

It's not really new, on older versions you needed to set the name with the
defaultremote parameter. (It's even included in the tutorial
,
although I am not sure that's a good idea.) The problem is that the same
setting cannot be used on vagrant, which needs an anonymous origin for
automated (ie. passwordless) updates and an authenticated gerrit remote for
pushes (T59680 ); and
vagrant-based and other checkouts behaving differently will confuse the
hell out of beginners. I would rather stick with cscott's recommendation to
just run git review -u all the time.

More importantly, I'm not sure it's worth to spend a lot of time on
improving our gerrit documentation now that we are supposedly a few months
away from ditching gerrit completely.
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2015-11-12 Thread C. Scott Ananian
This seems like we need to fork the instructions for tools lab -vs- others,
as has been suggested.
 --scott

On Thu, Nov 12, 2015 at 11:43 AM, Purodha Blissenbach <
puro...@blissenbach.org> wrote:

> On WikiMedia Tools Lab neither "git review -s" nor "git review -u" work in
> my tools. They run endlessly until you abort then with a keyboard
> interrupt.
> That is annoying.
> Purodha
>
>
> On 12.11.2015 17:35, C. Scott Ananian wrote:
>
>> Hashar: I think your criticisms of git-review might be out of date.  On my
>> debian system, "sudo apt-get install git-review" was sufficient to install
>> a version of git review which is adequate for all my needs (I have never
>> noticed any of the "known issues" you mention).  And "git review -s" is a
>> one-step way to set up the proper remotes and etc and leave you ready to
>> use it.  I am in the habit of typing "git review -u" since I noticed that
>> sometimes it doesn't update its remotes, but I'm guessing that's more
>> habit
>> than necessity.  None of the other steps you describe seem to be
>> necessary.
>>  --scott
>>
>> On Thu, Nov 12, 2015 at 4:10 AM, Antoine Musso 
>> wrote:
>>
>> Le 12/11/2015 03:25, S Page a écrit :
>>> > On Wed, Nov 11, 2015 at 12:50 AM, Petr Bena 
>>> wrote:
>>> >
>>> >> > Ok, I will try to merge all useful stuff in here:
>>> >> > https://www.mediawiki.org/wiki/Git_for_dummies
>>> >> >
>>> > The problem is these are matters of widely-varying taste and
>>> background.
>>> > When I tried to clean up in early 2013, git experts didn't even agree
>>> on
>>> > whether the gerrit remote should be origin, or whether people should
>>> use
>>> > `git review` at all.
>>>
>>> Hello,
>>>
>>> git-review is a python utility that acts as a thin wrapper around Gerrit
>>> workflow.  It has been written by the OpenStack community which is a
>>> python shop.
>>>
>>> It comes with few issues:
>>>
>>> * the versions that comes with Linux distributions are fairly outdated
>>> and comes with known issues.
>>> * installing using the python package managers is not straightforward
>>> and has several permissions issues depending on your operating system
>>> (some install system wide which require root, others to a user writable
>>> dir etc)
>>> * old versions were pushing to the HEAD of the repo iirc which is
>>> troublesome when you are working on another branch
>>> * some global configuration is needed
>>> * you need a remote named gerrit
>>>
>>> On that last point, git-review 1.26 comes with a new option 'usepushurl'
>>> which makes git-review reuse the origin repo and just set the push url
>>> to the ssh:// url.  The 'gerrit' remote will no more be needed.
>>>
>>> Ie in your ~/.gitconfig :
>>>
>>>[gitreview]
>>> usepushurl = 1
>>>
>>>
>>> What I did until that new version is that all my clones were done with a
>>> remote named 'gerrit' (git clone -o gerrit ).
>>>
>>> Since folks are tired of debugging python stacktraces and incorrect
>>> git-review configuration, some are recommending to use the underlying
>>> Gerrit workflow command:
>>>
>>>  git push origin HEAD:refs/publish/[/]
>>>
>>>
>>>
>>> --
>>> Antoine "hashar" Musso
>>>
>>>
>>> ___
>>> Wikitech-l mailing list
>>> Wikitech-l@lists.wikimedia.org
>>> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>>>
>>>
>
> ___
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>



-- 
(http://cscott.net)
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2015-11-12 Thread Tim Landscheidt
Purodha Blissenbach  wrote:

> On WikiMedia Tools Lab neither "git review -s" nor "git
> review -u" work in
> my tools. They run endlessly until you abort then with a
> keyboard interrupt.
> That is annoying.

> […]

Then please file a bug report.  When I run "git review -s"
on a fresh clone of
https://gerrit.wikimedia.org/r/operations/puppet, it fails
because it does not have a key, but it does that very
loudly.

Tim


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2015-11-12 Thread C. Scott Ananian
Hashar: I think your criticisms of git-review might be out of date.  On my
debian system, "sudo apt-get install git-review" was sufficient to install
a version of git review which is adequate for all my needs (I have never
noticed any of the "known issues" you mention).  And "git review -s" is a
one-step way to set up the proper remotes and etc and leave you ready to
use it.  I am in the habit of typing "git review -u" since I noticed that
sometimes it doesn't update its remotes, but I'm guessing that's more habit
than necessity.  None of the other steps you describe seem to be necessary.
 --scott

On Thu, Nov 12, 2015 at 4:10 AM, Antoine Musso  wrote:

> Le 12/11/2015 03:25, S Page a écrit :
> > On Wed, Nov 11, 2015 at 12:50 AM, Petr Bena  wrote:
> >
> >> > Ok, I will try to merge all useful stuff in here:
> >> > https://www.mediawiki.org/wiki/Git_for_dummies
> >> >
> > The problem is these are matters of widely-varying taste and background.
> > When I tried to clean up in early 2013, git experts didn't even agree on
> > whether the gerrit remote should be origin, or whether people should use
> > `git review` at all.
>
> Hello,
>
> git-review is a python utility that acts as a thin wrapper around Gerrit
> workflow.  It has been written by the OpenStack community which is a
> python shop.
>
> It comes with few issues:
>
> * the versions that comes with Linux distributions are fairly outdated
> and comes with known issues.
> * installing using the python package managers is not straightforward
> and has several permissions issues depending on your operating system
> (some install system wide which require root, others to a user writable
> dir etc)
> * old versions were pushing to the HEAD of the repo iirc which is
> troublesome when you are working on another branch
> * some global configuration is needed
> * you need a remote named gerrit
>
> On that last point, git-review 1.26 comes with a new option 'usepushurl'
> which makes git-review reuse the origin repo and just set the push url
> to the ssh:// url.  The 'gerrit' remote will no more be needed.
>
> Ie in your ~/.gitconfig :
>
>[gitreview]
> usepushurl = 1
>
>
> What I did until that new version is that all my clones were done with a
> remote named 'gerrit' (git clone -o gerrit ).
>
> Since folks are tired of debugging python stacktraces and incorrect
> git-review configuration, some are recommending to use the underlying
> Gerrit workflow command:
>
>  git push origin HEAD:refs/publish/[/]
>
>
>
> --
> Antoine "hashar" Musso
>
>
> ___
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>



-- 
(http://cscott.net)
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2015-11-12 Thread Purodha Blissenbach
On WikiMedia Tools Lab neither "git review -s" nor "git review -u" work 
in
my tools. They run endlessly until you abort then with a keyboard 
interrupt.

That is annoying.
Purodha

On 12.11.2015 17:35, C. Scott Ananian wrote:
Hashar: I think your criticisms of git-review might be out of date.  
On my
debian system, "sudo apt-get install git-review" was sufficient to 
install
a version of git review which is adequate for all my needs (I have 
never
noticed any of the "known issues" you mention).  And "git review -s" 
is a
one-step way to set up the proper remotes and etc and leave you ready 
to
use it.  I am in the habit of typing "git review -u" since I noticed 
that
sometimes it doesn't update its remotes, but I'm guessing that's more 
habit
than necessity.  None of the other steps you describe seem to be 
necessary.

 --scott

On Thu, Nov 12, 2015 at 4:10 AM, Antoine Musso  
wrote:



Le 12/11/2015 03:25, S Page a écrit :
> On Wed, Nov 11, 2015 at 12:50 AM, Petr Bena  
wrote:

>
>> > Ok, I will try to merge all useful stuff in here:
>> > https://www.mediawiki.org/wiki/Git_for_dummies
>> >
> The problem is these are matters of widely-varying taste and 
background.
> When I tried to clean up in early 2013, git experts didn't even 
agree on
> whether the gerrit remote should be origin, or whether people 
should use

> `git review` at all.

Hello,

git-review is a python utility that acts as a thin wrapper around 
Gerrit

workflow.  It has been written by the OpenStack community which is a
python shop.

It comes with few issues:

* the versions that comes with Linux distributions are fairly 
outdated

and comes with known issues.
* installing using the python package managers is not 
straightforward
and has several permissions issues depending on your operating 
system
(some install system wide which require root, others to a user 
writable

dir etc)
* old versions were pushing to the HEAD of the repo iirc which is
troublesome when you are working on another branch
* some global configuration is needed
* you need a remote named gerrit

On that last point, git-review 1.26 comes with a new option 
'usepushurl'
which makes git-review reuse the origin repo and just set the push 
url

to the ssh:// url.  The 'gerrit' remote will no more be needed.

Ie in your ~/.gitconfig :

   [gitreview]
usepushurl = 1


What I did until that new version is that all my clones were done 
with a

remote named 'gerrit' (git clone -o gerrit ).

Since folks are tired of debugging python stacktraces and incorrect
git-review configuration, some are recommending to use the 
underlying

Gerrit workflow command:

 git push origin HEAD:refs/publish/[/]



--
Antoine "hashar" Musso


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l




___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2015-11-11 Thread Petr Bena
Ok, I will try to merge all useful stuff in here:
https://www.mediawiki.org/wiki/Git_for_dummies

On Tue, Nov 10, 2015 at 8:26 PM, Nick Wilson (Quiddity)
 wrote:
> On Tue, Nov 10, 2015 at 10:54 AM, Legoktm  wrote:
>>
>> Hi,
>>
>> On 11/10/2015 09:06 AM, Petr Bena wrote:
>> > Perhaps it would worth merging and putting to some central location?
>>
>> Yes, that sounds like a good idea. I typically recommend
>>  to
>> people who are confused with git.
>>
>
> +1, as someone who uses it rarely enough to /always/ have to consult the FAQs.
> I compiled a list at https://www.mediawiki.org/wiki/Git/Tips#See_also
> and posted at https://www.mediawiki.org/wiki/Topic:Ssg7cjp65lw1oc7y
>
> ___
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2015-11-11 Thread S Page
On Wed, Nov 11, 2015 at 12:50 AM, Petr Bena  wrote:

> Ok, I will try to merge all useful stuff in here:
> https://www.mediawiki.org/wiki/Git_for_dummies
>

The problem is these are matters of widely-varying taste and background.
When I tried to clean up in early 2013, git experts didn't even agree on
whether the gerrit remote should be origin, or whether people should use
`git review` at all. (Aside: right now [[Git]] has the awful
community-splitting  comment
"To simply *browse & fork our code* you can use the GitHub mirror
."
followed by the precisely wrong git clone command for someone trying to
make a patch:
   git clone https://...
Sigh.)

I would urge people to judiciously update the pages we have, and only
create very targeted new pages rather than yet another starting point.
https://www.mediawiki.org/wiki/Gerrit/Getting_started seems OK, it's
focused on a new gerrit contributor. Gerrit/Tutorial is huge because this
isn't simple.

So here's more taste and matters of opinion.

* "the minimal knowledge needed in order to push to all major repositories
we use,"  Surely Dummies only use gerrit.  Why explain anything else?
* "VCS" term is not necessary, nobody uses it.
* "master" explanation brings in irrelevant detail. It's "The thing you get
from a remote repo and should never change"
* The `svn commands` are irrelevant. Dummies don't know SVN.
* Try not to use angle brackets, like git clone ,
dummies will type them. (I realize the  tag won't let you italicize
:-( )
* git pull --rebase is a bad idea, it leads to surprises.
* The way to avoid merge conflicts is NEVER EVER make an edit without first
creating a branch.
* Then, the guaranteed reliable way to update is `git checkout master; git
pull --ff-only`. That will stop you from making a mistake, it will stop you
from having your own local master with local changes buried down the commit
log.
* The fact that git mergetool shows up so soon indicates this is no longer
a guide for dummies, it's now a guide for troubleshooting. A guide for
dummies should give commands and advice to avoid trouble.
* git diff shows up too soon. Instead, dummies should be running `git
status` all the time. The way pros do this is to change their shell prompt
to show the repo status and branch. Setting this up will *change your life*
[1]. But it's too advanced for a Dummies guide. (I think MW-Vagrant's shell
should do it for you.)

* "If you want to push your branch to origin  git push origin
". Huh? I don't see how someone working on WMF projects can
ever do that.  The whole point of gerrit is you don't own master and should
never ever edit it because that way lies misery.

I guess this is actually a guide for tool labs where people control their
own remote repo and often do keep it on github. Fine, so say so: please
please rename it Git/Guide_for_tool_labs_repo_users or whatever to avoid
confusion.

Again, I acknowledge how hard this is.

[1] I used http://briancarper.net/blog/570/git-info-in-your-zsh-prompt ,
but I use the zsh shell so that's no help for 95%


On Tue, Nov 10, 2015 at 8:26 PM, Nick Wilson (Quiddity)
>  wrote:
> > On Tue, Nov 10, 2015 at 10:54 AM, Legoktm 
> wrote:
> >>
> >> Hi,
> >>
> >> On 11/10/2015 09:06 AM, Petr Bena wrote:
> >> > Perhaps it would worth merging and putting to some central location?
> >>
> >> Yes, that sounds like a good idea. I typically recommend
> >>  to
> >> people who are confused with git.
> >>
> >
> > +1, as someone who uses it rarely enough to /always/ have to consult the
> FAQs.
> > I compiled a list at https://www.mediawiki.org/wiki/Git/Tips#See_also
> > and posted at https://www.mediawiki.org/wiki/Topic:Ssg7cjp65lw1oc7y
>

-- 
=S Page  WMF Tech writer
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2015-11-11 Thread MZMcBride
S Page wrote:
>I would urge people to judiciously update the pages we have, and only
>create very targeted new pages rather than yet another starting point.

For sure. It might also make sense to investigate placing some of the more
in-depth Git tutorial content on a project other than mediawiki.org such
as Wikibooks. Wikibooks already has programming language guides, so adding
version control system guides seems like a potentially nice complement.
Ideally the documentation on mediawiki.org would focus more on
contributing to MediaWiki (or Wikimedia code repositories).

>https://www.mediawiki.org/wiki/Gerrit/Getting_started seems OK, it's
>focused on a new gerrit contributor.

I submit changesets to Gerrit infrequently enough that I still refer to
this page. I've really enjoyed reading this thread and the links within
it. A few people have told me that the "Git For Ages 4 And Up" video is
decent (), if anyone is
interested in a non-textual Git guide.

MZMcBride



___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2015-11-11 Thread Antoine Musso
Le 10/11/2015 17:58, Petr Bena a écrit :
> Hello,
> 
> I would like to remind that I made this guide some time ago:
> 
> https://www.mediawiki.org/wiki/User:Petrb/Git_for_idiots
> 
> It always quite sucked and still does, but I tried to slightly rewrite
> it now, so it should contain more accurate information.
> 
> I would like to keep it as a super simple manual / cheat sheet for
> git, that is as much clear and simple as possible.
> 
> If you ever struggled with git, maybe it could help you. If you are a
> git expert you may want to contribute to it? The name of the guide may
> not be a best choice, so I might eventually move it to [[Git for
> dummies]] or something like that, so that it sounds a bit more
> friendly.
> 
> I don't know if we already have any super simple guide / cheat sheet
> for git, where you could find everything essential on 1 page (and it
> was a wiki page editable by everyone), but I think we don't. We might
> use this as one?

Hello,

I recommend to spend some time to read and understand the book "Pro Git"
by Scott Chacon and Ben Straub.  It is available in several format:
website, pdf, epub and even a paper version.  There are even translated
versions.

 http://www.git-scm.com/book/

If you only had one chapter to read, probably 90% of my git activity is
covered by chapter 3: "Git Branching".


If you feel like a pro already, look at:

`git rerere`
http://www.git-scm.com/book/en/v2/Git-Tools-Rerere
`git reflog`
http://www.git-scm.com/docs/git-reflog

-- 
Antoine "hashar" Musso


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2015-11-11 Thread aude
On Tue, Nov 10, 2015 at 6:06 PM, Petr Bena  wrote:

> Now I also found this awesome guide:
> https://www.mediawiki.org/wiki/User:Aude/Git
>
> Perhaps it would worth merging and putting to some central location?
>
>
This is just stuff I had to learn up how to do at some point.

Would be happy for this to be merged / reused / combined with the other
guides and be somewhere easier to find. :)

Cheers,
Katie



> On Tue, Nov 10, 2015 at 5:58 PM, Petr Bena  wrote:
> > Hello,
> >
> > I would like to remind that I made this guide some time ago:
> >
> > https://www.mediawiki.org/wiki/User:Petrb/Git_for_idiots
> >
> > It always quite sucked and still does, but I tried to slightly rewrite
> > it now, so it should contain more accurate information.
> >
> > I would like to keep it as a super simple manual / cheat sheet for
> > git, that is as much clear and simple as possible.
> >
> > If you ever struggled with git, maybe it could help you. If you are a
> > git expert you may want to contribute to it? The name of the guide may
> > not be a best choice, so I might eventually move it to [[Git for
> > dummies]] or something like that, so that it sounds a bit more
> > friendly.
> >
> > I don't know if we already have any super simple guide / cheat sheet
> > for git, where you could find everything essential on 1 page (and it
> > was a wiki page editable by everyone), but I think we don't. We might
> > use this as one?
>
> ___
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>



-- 
@wikimediadc / @wikidata
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2015-11-10 Thread Petr Bena
Now I also found this awesome guide:
https://www.mediawiki.org/wiki/User:Aude/Git

Perhaps it would worth merging and putting to some central location?

On Tue, Nov 10, 2015 at 5:58 PM, Petr Bena  wrote:
> Hello,
>
> I would like to remind that I made this guide some time ago:
>
> https://www.mediawiki.org/wiki/User:Petrb/Git_for_idiots
>
> It always quite sucked and still does, but I tried to slightly rewrite
> it now, so it should contain more accurate information.
>
> I would like to keep it as a super simple manual / cheat sheet for
> git, that is as much clear and simple as possible.
>
> If you ever struggled with git, maybe it could help you. If you are a
> git expert you may want to contribute to it? The name of the guide may
> not be a best choice, so I might eventually move it to [[Git for
> dummies]] or something like that, so that it sounds a bit more
> friendly.
>
> I don't know if we already have any super simple guide / cheat sheet
> for git, where you could find everything essential on 1 page (and it
> was a wiki page editable by everyone), but I think we don't. We might
> use this as one?

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2015-11-10 Thread Nick Wilson (Quiddity)
On Tue, Nov 10, 2015 at 10:54 AM, Legoktm  wrote:
>
> Hi,
>
> On 11/10/2015 09:06 AM, Petr Bena wrote:
> > Perhaps it would worth merging and putting to some central location?
>
> Yes, that sounds like a good idea. I typically recommend
>  to
> people who are confused with git.
>

+1, as someone who uses it rarely enough to /always/ have to consult the FAQs.
I compiled a list at https://www.mediawiki.org/wiki/Git/Tips#See_also
and posted at https://www.mediawiki.org/wiki/Topic:Ssg7cjp65lw1oc7y

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2015-11-10 Thread Legoktm
Hi,

On 11/10/2015 09:06 AM, Petr Bena wrote:
> Perhaps it would worth merging and putting to some central location?

Yes, that sounds like a good idea. I typically recommend
 to
people who are confused with git.

-- Legoktm

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2013-05-14 Thread Jiabao Wu
I am new to gerrit for mediawiki. It really took me a long time to
make it work, while there is nothing wrong in the instructions.
Sometimes I solved the problems I encountered by simple methods like
restart, update. I feel less instruction manuals with more detailed
information would help. Also, it would be nice if there is a trouble
shooting page, everyone can add the problem under the corresponding
category in the page.

On Sat, May 11, 2013 at 8:34 AM, Marc A. Pelletier m...@uberbox.org wrote:
 On 05/10/2013 06:12 PM, Steve Summit wrote:
 (Obviously that's incomplete, but as someone who only understands
 conventional repositories that you check files out of and in to,
 I don't yet get git at all, myself, either.)

 Despite the snark, this is also my experience.  I've yet to get really
 used to git, and regularly run into problems whenever I do something
 more complicated than clone-commit-review; and right now my default
 solution to Oy!  I've hosed my repo again is to clone anew and
 cherry-pick stuff back in.

 And I'm no newbie, I've been using source control since SCCS and RCS.  :-)

 -- Marc


 ___
 Wikitech-l mailing list
 Wikitech-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/wikitech-l



-- 
Cheers,
Jiabao

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2013-05-10 Thread S Page
 I think that it might be a good idea to add another tutorial for
complete newbies.

Note Mediawiki.org doesn't have a Git tutorial. There are tons of those
on the web.  Thanks to recent work (by Quim and others I think) we have
three fairly rational pages,
https://www.mediawiki.org/wiki/Gerrit/Getting_started
https://www.mediawiki.org/wiki/Gerrit/Tutorial
https://www.mediawiki.org/wiki/Gerrit/Advanced_usage

Improve those. I'm certain more pages won't help.  Git+Gerrit is
fundamentally hard and complicated with lots of steps and commands, so the
tutorial is going to be long with lots of sections. Additional pages
writing down Stuff I found difficult before and after going through the
tutorial just add to the confusion.

Petr's document is useful for the dwindling band of people familiar with
svn, and I'm not sure why it mentions git push (I never use it, I use git
review with gerrit).

A big problem with the documents is inconsistent setup.  They don't even
agree whether the remote should be called origin, gerrit, or review,
because the experts who add to them have different opinions.

-- 
=S Page  software engineer on E3
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2013-05-10 Thread Rahul Maliakkal
Biggest disadvantage I see on the official documents is they don't
contain the hypothetical situation when something is wrong, they are
relying on the fact that everything is as it's supposed to be -
perfect. That user has perfectly configured system, that user doesn't
accidentally break repository or get lost in some process and stuck as
they can't continue for whatever reason.

I couldn't resist posting on this thread. I am relatively a new MediaWiki
developer and I started bug fixing 2 months ago during which I had to go
through https://www.mediawiki.org/wiki/Gerrit/Tutorial and many other
references spread over the Internet. The Tutorial assumes that everything
goes smoothly. Although the
https://www.mediawiki.org/wiki/Gerrit/Advanced_usage#Troubleshooting article
does solve few of the problems, there are still many issues to be
highlighted like what should the user do to undo a commit, some information
regarding staging and unstaging would be helpful, commands like git show
hash to view the changes after a developer commits, use of git log with
the option -p. These are just a few features that I would love to see and
maybe other new developers too.

Thanks


On Sat, May 11, 2013 at 3:05 AM, S Page sp...@wikimedia.org wrote:

  I think that it might be a good idea to add another tutorial for
 complete newbies.

 Note Mediawiki.org doesn't have a Git tutorial. There are tons of those
 on the web.  Thanks to recent work (by Quim and others I think) we have
 three fairly rational pages,
 https://www.mediawiki.org/wiki/Gerrit/Getting_started
 https://www.mediawiki.org/wiki/Gerrit/Tutorial
 https://www.mediawiki.org/wiki/Gerrit/Advanced_usage

 Improve those. I'm certain more pages won't help.  Git+Gerrit is
 fundamentally hard and complicated with lots of steps and commands, so the
 tutorial is going to be long with lots of sections. Additional pages
 writing down Stuff I found difficult before and after going through the
 tutorial just add to the confusion.

 Petr's document is useful for the dwindling band of people familiar with
 svn, and I'm not sure why it mentions git push (I never use it, I use git
 review with gerrit).

 A big problem with the documents is inconsistent setup.  They don't even
 agree whether the remote should be called origin, gerrit, or review,
 because the experts who add to them have different opinions.

 --
 =S Page  software engineer on E3
 ___
 Wikitech-l mailing list
 Wikitech-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/wikitech-l

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2013-05-10 Thread Steve Summit
S Page wrote:
 Note Mediawiki.org doesn't have a Git tutorial. There are tons of those
 on the web...

 Git+Gerrit is fundamentally hard and complicated...

So perhaps there could be a little section somewhere saying
something like:

Using Git and Gerrit effectively requires understanding
how they work.  If you're used to conventional source
code repositories like svn, you'll find git to be
considerably different, in part because it's completely
distributed, without any central repository which you
check files out of, much less that you check files
in to.  Instead, with git, you mumble flarg the bjango
in order to tnark your flittle and svetch it out to the
rest of the hortlespoon.  For a good explanation of this, 
see http://one.of.the/tons/of/good/tutorials/on/the/web.

(Obviously that's incomplete, but as someone who only understands
conventional repositories that you check files out of and in to,
I don't yet get git at all, myself, either.)

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2013-05-10 Thread Marc A. Pelletier
On 05/10/2013 06:12 PM, Steve Summit wrote:
 (Obviously that's incomplete, but as someone who only understands
 conventional repositories that you check files out of and in to,
 I don't yet get git at all, myself, either.)

Despite the snark, this is also my experience.  I've yet to get really
used to git, and regularly run into problems whenever I do something
more complicated than clone-commit-review; and right now my default
solution to Oy!  I've hosed my repo again is to clone anew and
cherry-pick stuff back in.

And I'm no newbie, I've been using source control since SCCS and RCS.  :-)

-- Marc


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2013-05-08 Thread Chad
On Wed, May 8, 2013 at 12:34 PM, Petr Bena benap...@gmail.com wrote:
 Hi,

 Long time ago when I started learning with git I decided to create a
 simple guide (basically I was just taking some notes of what is
 needed). I never thought that it could be useful to anyone so I never
 announced it anywhere. However I got some feedback to it, so I decided
 to inform you too.

 The basic idea is to create a TOTALLY SIMPLE guide that git
 illiterates like me can understand and thanks to which they would find
 out how to do stuff in wikimedia git / gerrit.

 Link is here: www.mediawiki.org/wiki/User:Petrb/Git_for_idiots

 It doesn't contain so much and there are some mistakes / feel free to fix 
 them.

 Since wikimedia switched to gerrit from svn I have yet met a tons of
 people who had problems adapting to it, so this could eventually help
 some.


We've got [[Git/Workflow]], [[Git/Tutorial]] and [[Git/Getting
started]] (in decreasing
order of complexity/depth), so I would be hesitant to add yet another
howto page.
Considering this is supposed to be quick-and-easy docs, I'd suggest folding any
unique content into the getting started doc.

-Chad

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2013-05-08 Thread Petr Bena
I was using these tutorials in past, and they were pretty complicated
for me to understand git. I don't say it should be considered some
official documentation, rather something what desperate people could
use.

Git/Workflow and such are written by people who already understand git
- they don't see what seems complicated to newbies or what is really
hard and makes git evil to new users. I think some far, far simpler
guide like git for dummies or whatever similar, could be useful for
many new contributors who have no idea about git.

On Wed, May 8, 2013 at 6:37 PM, Chad innocentkil...@gmail.com wrote:
 On Wed, May 8, 2013 at 12:34 PM, Petr Bena benap...@gmail.com wrote:
 Hi,

 Long time ago when I started learning with git I decided to create a
 simple guide (basically I was just taking some notes of what is
 needed). I never thought that it could be useful to anyone so I never
 announced it anywhere. However I got some feedback to it, so I decided
 to inform you too.

 The basic idea is to create a TOTALLY SIMPLE guide that git
 illiterates like me can understand and thanks to which they would find
 out how to do stuff in wikimedia git / gerrit.

 Link is here: www.mediawiki.org/wiki/User:Petrb/Git_for_idiots

 It doesn't contain so much and there are some mistakes / feel free to fix 
 them.

 Since wikimedia switched to gerrit from svn I have yet met a tons of
 people who had problems adapting to it, so this could eventually help
 some.


 We've got [[Git/Workflow]], [[Git/Tutorial]] and [[Git/Getting
 started]] (in decreasing
 order of complexity/depth), so I would be hesitant to add yet another
 howto page.
 Considering this is supposed to be quick-and-easy docs, I'd suggest folding 
 any
 unique content into the getting started doc.

 -Chad

 ___
 Wikitech-l mailing list
 Wikitech-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/wikitech-l

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2013-05-08 Thread Chad
Well, that was the point of [[Git/Getting started]] because the Workflow
document sucks.

-Chad

On Wed, May 8, 2013 at 12:41 PM, Petr Bena benap...@gmail.com wrote:
 I was using these tutorials in past, and they were pretty complicated
 for me to understand git. I don't say it should be considered some
 official documentation, rather something what desperate people could
 use.

 Git/Workflow and such are written by people who already understand git
 - they don't see what seems complicated to newbies or what is really
 hard and makes git evil to new users. I think some far, far simpler
 guide like git for dummies or whatever similar, could be useful for
 many new contributors who have no idea about git.

 On Wed, May 8, 2013 at 6:37 PM, Chad innocentkil...@gmail.com wrote:
 On Wed, May 8, 2013 at 12:34 PM, Petr Bena benap...@gmail.com wrote:
 Hi,

 Long time ago when I started learning with git I decided to create a
 simple guide (basically I was just taking some notes of what is
 needed). I never thought that it could be useful to anyone so I never
 announced it anywhere. However I got some feedback to it, so I decided
 to inform you too.

 The basic idea is to create a TOTALLY SIMPLE guide that git
 illiterates like me can understand and thanks to which they would find
 out how to do stuff in wikimedia git / gerrit.

 Link is here: www.mediawiki.org/wiki/User:Petrb/Git_for_idiots

 It doesn't contain so much and there are some mistakes / feel free to fix 
 them.

 Since wikimedia switched to gerrit from svn I have yet met a tons of
 people who had problems adapting to it, so this could eventually help
 some.


 We've got [[Git/Workflow]], [[Git/Tutorial]] and [[Git/Getting
 started]] (in decreasing
 order of complexity/depth), so I would be hesitant to add yet another
 howto page.
 Considering this is supposed to be quick-and-easy docs, I'd suggest folding 
 any
 unique content into the getting started doc.

 -Chad

 ___
 Wikitech-l mailing list
 Wikitech-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/wikitech-l

 ___
 Wikitech-l mailing list
 Wikitech-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/wikitech-l

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2013-05-08 Thread Anthony
I guess the viewpoint and perspective from the more experienced users may
be different. The veterans may start to take some knowledge for granted, as
a given knowledge that they may thing people would already know.

For example, the underlying concept of git commit is something that I now
take for granted. But it's something that I have to really visit and talk
about when I'm teaching a friend to use git.

Perhaps we need contributions from people who have only just learned how to
properly use git, rather than only having veterans write the guide up.
People who still have the learning experience fresh in their minds.

And perhaps we also need contributions from people who routinely teach
their friends about git.


On Thu, May 9, 2013 at 12:54 AM, Chad innocentkil...@gmail.com wrote:

 Well, that was the point of [[Git/Getting started]] because the Workflow
 document sucks.

 -Chad

 On Wed, May 8, 2013 at 12:41 PM, Petr Bena benap...@gmail.com wrote:
  I was using these tutorials in past, and they were pretty complicated
  for me to understand git. I don't say it should be considered some
  official documentation, rather something what desperate people could
  use.
 
  Git/Workflow and such are written by people who already understand git
  - they don't see what seems complicated to newbies or what is really
  hard and makes git evil to new users. I think some far, far simpler
  guide like git for dummies or whatever similar, could be useful for
  many new contributors who have no idea about git.
 
  On Wed, May 8, 2013 at 6:37 PM, Chad innocentkil...@gmail.com wrote:
  On Wed, May 8, 2013 at 12:34 PM, Petr Bena benap...@gmail.com wrote:
  Hi,
 
  Long time ago when I started learning with git I decided to create a
  simple guide (basically I was just taking some notes of what is
  needed). I never thought that it could be useful to anyone so I never
  announced it anywhere. However I got some feedback to it, so I decided
  to inform you too.
 
  The basic idea is to create a TOTALLY SIMPLE guide that git
  illiterates like me can understand and thanks to which they would find
  out how to do stuff in wikimedia git / gerrit.
 
  Link is here: www.mediawiki.org/wiki/User:Petrb/Git_for_idiots
 
  It doesn't contain so much and there are some mistakes / feel free to
 fix them.
 
  Since wikimedia switched to gerrit from svn I have yet met a tons of
  people who had problems adapting to it, so this could eventually help
  some.
 
 
  We've got [[Git/Workflow]], [[Git/Tutorial]] and [[Git/Getting
  started]] (in decreasing
  order of complexity/depth), so I would be hesitant to add yet another
  howto page.
  Considering this is supposed to be quick-and-easy docs, I'd suggest
 folding any
  unique content into the getting started doc.
 
  -Chad
 
  ___
  Wikitech-l mailing list
  Wikitech-l@lists.wikimedia.org
  https://lists.wikimedia.org/mailman/listinfo/wikitech-l
 
  ___
  Wikitech-l mailing list
  Wikitech-l@lists.wikimedia.org
  https://lists.wikimedia.org/mailman/listinfo/wikitech-l

 ___
 Wikitech-l mailing list
 Wikitech-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/wikitech-l

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2013-05-08 Thread Quim Gil

On 05/08/2013 09:41 AM, Petr Bena wrote:

I was using these tutorials in past, and they were pretty complicated
for me to understand git.


Have you checked recently these pages?

http://www.mediawiki.org/wiki/Gerrit/Getting_started

http://www.mediawiki.org/wiki/Gerrit/Tutorial

I'm a git-idiot and they were useful even before we went through the 
Git/Gerrit a couple of months ago.


You are encouraged to improve these pages. Thank you! As Chad says we 
are not going to push a 3rd reference document.


--
Quim Gil
Technical Contributor Coordinator @ Wikimedia Foundation
http://www.mediawiki.org/wiki/User:Qgil

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2013-05-08 Thread Yury Katkov
On Wed, May 8, 2013 at 8:34 PM, Petr Bena benap...@gmail.com wrote:

 Hi,

 Long time ago when I started learning with git I decided to create a
 simple guide (basically I was just taking some notes of what is
 needed). I never thought that it could be useful to anyone so I never
 announced it anywhere. However I got some feedback to it, so I decided
 to inform you too.

 The basic idea is to create a TOTALLY SIMPLE guide that git
 illiterates like me can understand and thanks to which they would find
 out how to do stuff in wikimedia git / gerrit.

 Link is here: www.mediawiki.org/wiki/User:Petrb/Git_for_idiots

I love it!

I've written something similar for myself as well: just a bunch of
copy+paste commands for those who use Git once in two months.



 It doesn't contain so much and there are some mistakes / feel free to fix
 them.

 Since wikimedia switched to gerrit from svn I have yet met a tons of
 people who had problems adapting to it, so this could eventually help
 some.

 ___
 Wikitech-l mailing list
 Wikitech-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/wikitech-l
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2013-05-08 Thread Petr Bena
Biggest disadvantage I see on the official documents is they don't
contain the hypothetical situation when something is wrong, they are
relying on the fact that everything is as it's supposed to be -
perfect. That user has perfectly configured system, that user doesn't
accidentally break repository or get lost in some process and stuck as
they can't continue for whatever reason.

The  guide should count on that and display some alternative commands
or reasons why some error messages are showing up (especially gerrit
is making stuff very hard, sometimes it reject the commit with cryptic
reasons) - or git-review is missing the .gitreview file sometimes and
doesn't work. These newbie guides should count on that.

The expert on git never get in such a situation because they are doing
everything correct. So they naturally can't expect this to happen. I
know I can edit the current documents but I have no idea how to merge
them with document I wrote. We could eventually insert a FAQ into
beginner guide that contain Why am I getting error X, Y etc with
explanation why it happens and how to fix it.

On Wed, May 8, 2013 at 7:49 PM, Yury Katkov katkov.ju...@gmail.com wrote:
 On Wed, May 8, 2013 at 8:34 PM, Petr Bena benap...@gmail.com wrote:

 Hi,

 Long time ago when I started learning with git I decided to create a
 simple guide (basically I was just taking some notes of what is
 needed). I never thought that it could be useful to anyone so I never
 announced it anywhere. However I got some feedback to it, so I decided
 to inform you too.

 The basic idea is to create a TOTALLY SIMPLE guide that git
 illiterates like me can understand and thanks to which they would find
 out how to do stuff in wikimedia git / gerrit.

 Link is here: www.mediawiki.org/wiki/User:Petrb/Git_for_idiots

 I love it!

 I've written something similar for myself as well: just a bunch of
 copy+paste commands for those who use Git once in two months.



 It doesn't contain so much and there are some mistakes / feel free to fix
 them.

 Since wikimedia switched to gerrit from svn I have yet met a tons of
 people who had problems adapting to it, so this could eventually help
 some.

 ___
 Wikitech-l mailing list
 Wikitech-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/wikitech-l
 ___
 Wikitech-l mailing list
 Wikitech-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/wikitech-l

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2013-05-08 Thread Petr Bena
Also note that in my document I have some hints like this:

Sometimes it's needed to use following, should you know why, feel free
to explain it:
git push origin HEAD:refs/publish/master

which I was told to use by someone else, and it works! So I noted it
somewhere in case I would get into same issue again BUT I have no idea
why it works. I just know it works and I don't know why. These things
should be explained by expert, not me. But every notes of beginner in
git or questions would greatly contribute to improve the documents


On Wed, May 8, 2013 at 9:02 PM, Petr Bena benap...@gmail.com wrote:
 Biggest disadvantage I see on the official documents is they don't
 contain the hypothetical situation when something is wrong, they are
 relying on the fact that everything is as it's supposed to be -
 perfect. That user has perfectly configured system, that user doesn't
 accidentally break repository or get lost in some process and stuck as
 they can't continue for whatever reason.

 The  guide should count on that and display some alternative commands
 or reasons why some error messages are showing up (especially gerrit
 is making stuff very hard, sometimes it reject the commit with cryptic
 reasons) - or git-review is missing the .gitreview file sometimes and
 doesn't work. These newbie guides should count on that.

 The expert on git never get in such a situation because they are doing
 everything correct. So they naturally can't expect this to happen. I
 know I can edit the current documents but I have no idea how to merge
 them with document I wrote. We could eventually insert a FAQ into
 beginner guide that contain Why am I getting error X, Y etc with
 explanation why it happens and how to fix it.

 On Wed, May 8, 2013 at 7:49 PM, Yury Katkov katkov.ju...@gmail.com wrote:
 On Wed, May 8, 2013 at 8:34 PM, Petr Bena benap...@gmail.com wrote:

 Hi,

 Long time ago when I started learning with git I decided to create a
 simple guide (basically I was just taking some notes of what is
 needed). I never thought that it could be useful to anyone so I never
 announced it anywhere. However I got some feedback to it, so I decided
 to inform you too.

 The basic idea is to create a TOTALLY SIMPLE guide that git
 illiterates like me can understand and thanks to which they would find
 out how to do stuff in wikimedia git / gerrit.

 Link is here: www.mediawiki.org/wiki/User:Petrb/Git_for_idiots

 I love it!

 I've written something similar for myself as well: just a bunch of
 copy+paste commands for those who use Git once in two months.



 It doesn't contain so much and there are some mistakes / feel free to fix
 them.

 Since wikimedia switched to gerrit from svn I have yet met a tons of
 people who had problems adapting to it, so this could eventually help
 some.

 ___
 Wikitech-l mailing list
 Wikitech-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/wikitech-l
 ___
 Wikitech-l mailing list
 Wikitech-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/wikitech-l

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2013-05-08 Thread Chad
On Wed, May 8, 2013 at 3:04 PM, Petr Bena benap...@gmail.com wrote:
 Also note that in my document I have some hints like this:

 Sometimes it's needed to use following, should you know why, feel free
 to explain it:
 git push origin HEAD:refs/publish/master

 which I was told to use by someone else, and it works! So I noted it
 somewhere in case I would get into same issue again BUT I have no idea
 why it works. I just know it works and I don't know why. These things
 should be explained by expert, not me. But every notes of beginner in
 git or questions would greatly contribute to improve the documents


That's easy to explain, actually. This is what you're doing every time
you submit stuff to
Gerrit (and what the official Gerrit docs say to do).

`git push origin HEAD:refs/for/master`

So what this is saying is Push to origin my HEAD commit, with the
destination of
refs/for/master. refs/for/foobar is the magic Gerrit ref for This
change is FOR the branch
FOOBAR. HEAD doesn't have to be HEAD (it's just a pointer), you could
just as easily
refer to a random tag or sha1 in the same command. For example, let's
say you wanted to
push the change just before HEAD for review (but your HEAD wasn't
ready), you could do:

`git push origin HEAD~1:refs/for/master`

git-review is nothing more than a wrapper around these commands (and a
couple of other
things) since people like less typing :)

Just for comparison, when you're doing a `git push origin master` (a
la Github), you're actually
just typing the shorthand version of `git push origin
refs/heads/master:refs/heads/master.`

-Chad

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2013-05-08 Thread Mathieu Stumpf
Le mercredi 08 mai 2013 à 18:34 +0200, Petr Bena a écrit :
 Hi,
 
 Long time ago when I started learning with git I decided to create a
 simple guide (basically I was just taking some notes of what is
 needed). I never thought that it could be useful to anyone so I never
 announced it anywhere. However I got some feedback to it, so I decided
 to inform you too.
 
 The basic idea is to create a TOTALLY SIMPLE guide that git
 illiterates like me can understand and thanks to which they would find
 out how to do stuff in wikimedia git / gerrit.
 
 Link is here: www.mediawiki.org/wiki/User:Petrb/Git_for_idiots

Interesting idea. Probably you should also put a part for those who
don't know svn, just like you go with everything is ok/wrong. I
didn't read the whole thing, so maybe in practice it doen't matter, but
if you want something accessible to total newbies, you shouldn't expect
them to know svn. Also you may have more contributors using {{empty}}
than if you say I don't know windows, look at this and move along.

Aprart from that, nice job.

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Git for idiots

2013-05-08 Thread Moriel Schottlender
Quim Gil qgil at wikimedia.org writes:

 
 On 05/08/2013 09:41 AM, Petr Bena wrote:
  I was using these tutorials in past, and they were pretty complicated
  for me to understand git.
 
 Have you checked recently these pages?
 
 http://www.mediawiki.org/wiki/Gerrit/Getting_started
 
 http://www.mediawiki.org/wiki/Gerrit/Tutorial
 
 I'm a git-idiot and they were useful even before we went through the 
 Git/Gerrit a couple of months ago.
 
 You are encouraged to improve these pages. Thank you! As Chad says we 
 are not going to push a 3rd reference document.
 

I also had troubles with the existing tutorials, and for me it's even worse, 
since I am (shriek!) a Windows user. 

I actually started drafting a Gerrit/Git for Windows Dummies page with the 
solutions I found to be easiest for myself, and some of them are already up 
in Petr's page (Yay!)

For example, one of the biggest issues for me was the SSH public key. 
Creating a pair isn't a problem (the explanation in the tutorial is from 
GitHub, and is fairly straight forward) but finding where to *submit it* was 
tricky. 

The SSH Key submission appears as an option in two places - the wikitech 
site (where we ask for dev account) and the gerrit settings. It's really 
confusing. Also, where the tutorial/quickstart said something like 
git clone ssh://usern...@gerrit.wikimedia.org:29418/mediawiki/core.git
In effect, it means TOKEN (the shell token we chose when registering for 
development account) and not (as it looks) the username we use to log into 
gerrit.

These are small comments and they probably sound silly to people who are 
experienced and do this a lot, but for people who aren't so well versed with 
Git and Gerrit (or even linux and command-line work) they can get you stuck 
for hours.

I know that it's recommended we edit the existing tutorials, but in this 
case, I think that it might be a good idea to add another tutorial for 
complete newbies. 

The Getting Started tutorial is more of a reference -- it didn't 
completely help me when I started from scratch, but I use it a lot now to 
make sure I remember the procedure correctly. (I might add the 'fetch/reset' 
reference there in case someone wants to reset their changes from scratch, 
which happens to us newbies a lot ;)

The Advanced Usage is meant for advanced stuff and if something goes wrong 
-- it assumes you already have git going, and that you're on a GNU/Linux 
system for the most part.

Adding another page for a complete walkthrough for either windows users 
and/or people who aren't versed in git/gerrit can help newbies without 
ruining the references that experienced users use right now.

Moriel


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l