Re: [gentoo-user] Git for gentoo users?

2016-05-26 Thread Michael Orlitzky
On 05/26/2016 04:15 PM, Alan McKinnon wrote:
> 
> No, those are all the correct names that git uses. Possibly years of
> using cvs/svn has trained your brain to think in a particular way.
> 
> Git does not work that way. It's as different from svn as you can get
> for 2 reasons...

It all makes enough sense after you get used to it, but the problem is
that if you have some operation in mind and you read "git --help", then
you're going to guess the wrong command based on their names. Mercurial
and Darcs (which have a similar model) managed to get the names right.

The git people call their low-level commands "plumbing," and the
user-interface "porcelain." New user have trouble because the porcelain
commands are named after what the plumbing does. It's like if the
find/replace tool in your word processor was called "depth-first regular
expression group match substitution", and not "find."





Re: [gentoo-user] Git for gentoo users?

2016-05-26 Thread Alan McKinnon
On 26/05/2016 20:01, James wrote:
> 
> 
>> On 05/26/2016 04:32 AM, Peter Humphrey wrote:
>> Aye, there's the rub. Git is a closed book to me at the moment.
> 
> Hello,
> 
> I started a new thread for (2) reason. 
> 1. The original thread does not show up in my gmane, as it was
> down for a few days.
> 
> 2. I think 'subject drift' warrants a new thread. Anyway recap::
> 
> 
> You are not alone Peter. In fact there are so many git documents, howto
> and such that every time I 'dive in' I mostly get a mess. Thankfully,
> I keep duplicates of the codes in an old fashion directory tree 
> structure;(circa 35 years now).
> 
> Better yet MO writes::
> 
> 
> You'll spend a while getting used to git, there's no way around it. You
> just have to pick a project and force yourself to use git all day. All
> of the commands have the wrong names:
> 
>   * Want to check out a repository? There's `git checkout`, but that's
> not what it does. You want `git clone`.
> 
>   * Want to start a new branch? There's `git branch`, but what you
> actually want is `git checkout`.
> 
>   * Want to reset the modifications you've made to a file? There's
> `git reset`, but what you really want is `git checkout`.
> 
>   * Want to merge your changes with upstream? There's `git merge`,
> but chances are, you want `git pull --rebase`.
> 
>   * Want to commit a new file? There's `git commit`, but it won't work.

No, those are all the correct names that git uses. Possibly years of
using cvs/svn has trained your brain to think in a particular way.

Git does not work that way. It's as different from svn as you can get
for 2 reasons:

1. There is no upstream master in git. YOU are YOUR master so you can't
checkout someone else's code. You can only clone it to make a whole new
repo that you are in charge of. There's not even a concept of an
upstream or downstream repo, except when you chose to use some other
repo in that way. Considering it so makes it so.

2. SVN works on files, so you commit files. git works with consistent
contained diffs so you commit a bunch of diffs as a unit to your repo
after adding a new file to the list of stuff to be tracked.

As Linux says, when confronted with two choices and no clear winner
between them, pick the opposite to what cvs does. Perhaps the git devs
went a tad overboard in being contrary :-)

-- 
Alan McKinnon
alan.mckin...@gmail.com




[gentoo-user] Git for gentoo users?

2016-05-26 Thread James


> On 05/26/2016 04:32 AM, Peter Humphrey wrote:
> Aye, there's the rub. Git is a closed book to me at the moment.

Hello,

I started a new thread for (2) reason. 
1. The original thread does not show up in my gmane, as it was
down for a few days.

2. I think 'subject drift' warrants a new thread. Anyway recap::


You are not alone Peter. In fact there are so many git documents, howto
and such that every time I 'dive in' I mostly get a mess. Thankfully,
I keep duplicates of the codes in an old fashion directory tree 
structure;(circa 35 years now).

Better yet MO writes::


You'll spend a while getting used to git, there's no way around it. You
just have to pick a project and force yourself to use git all day. All
of the commands have the wrong names:

  * Want to check out a repository? There's `git checkout`, but that's
not what it does. You want `git clone`.

  * Want to start a new branch? There's `git branch`, but what you
actually want is `git checkout`.

  * Want to reset the modifications you've made to a file? There's
`git reset`, but what you really want is `git checkout`.

  * Want to merge your changes with upstream? There's `git merge`,
but chances are, you want `git pull --rebase`.

  * Want to commit a new file? There's `git commit`, but it won't work.

...and so on.

That said, after my bicycle, git is probably the most useful piece of
technology I use on a daily basis. All of the time I spent banging my
head on my desk turned out to be well worth it. So, don't despair too much.




which is GREAT! We just need more like this collected into the
gentoo-wiki-gentoo-git(hub)-handbook.


If fact maybe what we need is some GENTOO git/github guide collection that
ramps ups novices to some functional level with git and github via a well
defined pathway. Maybe that has already been documented on the irc channels
used by the 'proxy-maintainers'?Dunno.

But since git/hub is so intertwined now at gentoo, I'd surely appreciate a
GENTOO(git/hub)handbook so those of us not up to dev-status have a
functional guide that we can read and follow, up to a certain level. Maybe
that level is joining proxy-maintainer's club; then dev status.


Rote responses to the effect of 'go learn git/hub' I find is like learning
to cliff dive from 75' without first learning from a 1 meter spring-board.
It's just dysfunctional. The old CVS stuff was self explanatory and easy to
pick up.

I do follow the recent devmanual efforts and EAPI6 and it seems to me that 
the level of senior dev input to guide the other devs in those efforts is
bearing lots of fruit, as we (the user community) explore proxy-maintenance
and such 'step-up' pathways. If the devs want more proxy and devs to join,
making that pathway well defined goes a long way to encouraging folks, imho.


So what do others think, do we need a git/hub handbook right after the
gentoo-install-handbook, full of tips and recipes for gentoo git_noobs?


comments welcome,
James