1 |
On 26/05/2016 20:01, James wrote: |
2 |
> |
3 |
> |
4 |
>> On 05/26/2016 04:32 AM, Peter Humphrey wrote: |
5 |
>> Aye, there's the rub. Git is a closed book to me at the moment. |
6 |
> |
7 |
> Hello, |
8 |
> |
9 |
> I started a new thread for (2) reason. |
10 |
> 1. The original thread does not show up in my gmane, as it was |
11 |
> down for a few days. |
12 |
> |
13 |
> 2. I think 'subject drift' warrants a new thread. Anyway recap:: |
14 |
> |
15 |
> |
16 |
> You are not alone Peter. In fact there are so many git documents, howto |
17 |
> and such that every time I 'dive in' I mostly get a mess. Thankfully, |
18 |
> I keep duplicates of the codes in an old fashion directory tree |
19 |
> structure;(circa 35 years now). |
20 |
> |
21 |
> Better yet MO writes:: |
22 |
> <snip> |
23 |
> |
24 |
> You'll spend a while getting used to git, there's no way around it. You |
25 |
> just have to pick a project and force yourself to use git all day. All |
26 |
> of the commands have the wrong names: |
27 |
> |
28 |
> * Want to check out a repository? There's `git checkout`, but that's |
29 |
> not what it does. You want `git clone`. |
30 |
> |
31 |
> * Want to start a new branch? There's `git branch`, but what you |
32 |
> actually want is `git checkout`. |
33 |
> |
34 |
> * Want to reset the modifications you've made to a file? There's |
35 |
> `git reset`, but what you really want is `git checkout`. |
36 |
> |
37 |
> * Want to merge your changes with upstream? There's `git merge`, |
38 |
> but chances are, you want `git pull --rebase`. |
39 |
> |
40 |
> * Want to commit a new file? There's `git commit`, but it won't work. |
41 |
|
42 |
No, those are all the correct names that git uses. Possibly years of |
43 |
using cvs/svn has trained your brain to think in a particular way. |
44 |
|
45 |
Git does not work that way. It's as different from svn as you can get |
46 |
for 2 reasons: |
47 |
|
48 |
1. There is no upstream master in git. YOU are YOUR master so you can't |
49 |
checkout someone else's code. You can only clone it to make a whole new |
50 |
repo that you are in charge of. There's not even a concept of an |
51 |
upstream or downstream repo, except when you chose to use some other |
52 |
repo in that way. Considering it so makes it so. |
53 |
|
54 |
2. SVN works on files, so you commit files. git works with consistent |
55 |
contained diffs so you commit a bunch of diffs as a unit to your repo |
56 |
after adding a new file to the list of stuff to be tracked. |
57 |
|
58 |
As Linux says, when confronted with two choices and no clear winner |
59 |
between them, pick the opposite to what cvs does. Perhaps the git devs |
60 |
went a tad overboard in being contrary :-) |
61 |
|
62 |
-- |
63 |
Alan McKinnon |
64 |
alan.mckinnon@×××××.com |