adonthell-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Adonthell-general] Re: [maybe slightly OT] Git pull origin master


From: shirish शिरीष
Subject: Re: [Adonthell-general] Re: [maybe slightly OT] Git pull origin master
Date: Fri, 17 Dec 2010 13:39:46 +0530

In-line :-

On Fri, Dec 17, 2010 at 03:20, Chris Frey <address@hidden> wrote:

<snipped>

> Some branches have links to upstream ones.  These are generally
> branches like master (linked to origin/master) and branches that you
> create yourself based on upstream branches
> (git checkout -b mine origin/testing).
>
> You can see these links in .git/config where they are maintained by git.
>
> So, "git pull" depends on your current branch.  If that branch is linked
> to an upstream one, that's what you'll be getting.  It may not always
> be master, and it may not always be the "origin" remote.  (You can create
> multiple remote upstream sources with git-remote)

First a confession, I'm no programmer and don't have inclination to do
programming. This is just out of curiosity and being a bit more clued
in to what I am doing rather than just being a bot/robot.

Ok, I have to get around this, I have some idea of what you are trying
to say, the problem is 'origin' and 'master' for me mean the same.
Little from what I understand/understood these two are different
repositories, similar to what I've seen in subversion - 'HEAD' and
'branches' where usually the 'HEAD' or 'TRUNK' is where all the
development happens whereas when things are polished and ready for
public consumption they are usually broken or pushed into a 'BRANCH' .
This is how 'generally' most of the subversion trees I have seen.
Please correct me if this is wrong.

Now in Git from what I understand, this mixing and merging is much
more easier, flexible than in subversion. This is good if you take in
something like the kernel where there are so many sub-modules and so
many things which need to work together in order for us to have a
stable OS.

Its also good so if a new programmer comes up and wants to do some
development, he could take that git copy,make his own stuff and have
his own tree with say 'master2' or even the name 'master' or whatever
he feels fit. Our developer Kai (and others) and simply cherrypick
some changes from his tree and his own if it makes sense - some new
features or whatever.  I am guessing something similar is the
relationship between 'origin' and 'master' here.

> Note that "git pull origin master" is a shortcut for doing
> "git fetch origin ; git merge origin/master"

cool.

> This would be your origin.  You can view a list of your remotes with
> "git remote" and display the details of each one with
> "git remote show origin".  Replace origin with the remote name of choice.

Ok, again this one I have to get my head around. Some things I tried :-

/usr/local/src/adonthell$ git remote show adonthell
fatal: 'adonthell' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

$ git remote show master
fatal: 'master' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

Then,

/usr/local/src/adonthell$ git remote show origin
* remote origin
  Fetch URL: git://github.com/ksterker/adonthell.git
  Push  URL: git://github.com/ksterker/adonthell.git
  HEAD branch: master
  Remote branches:
    audio_manager tracked
    logger        tracked
    master        tracked
    unit-tests    tracked
    valgrind      tracked
  Local branch configured for 'git pull':
    master merges with remote master
  Local ref configured for 'git push':
    master pushes to master (up to date)

The only thing I find wrong or less is unlike subversion it doesn't
tell the last release.

<snipped>

>> a. :/usr/local/src/adonthell$ git pull origin master
>> >From git://github.com/ksterker/adonthell
>>  * branch            master     -> FETCH_HEAD
>> Already up-to-date.
>
> This just updates your repo and current branch.

cool.

>> b. /usr/local/src/adonthell$ git show master
>> commit 83ed46469f327a78d3dc839019797ebf56fee470
>> Author: Kai Sterker <address@hidden(none)>
>> Date:   Sun Dec 12 13:28:32 2010 +0100
>>
>>     ADDED scrollbar/indicator widget
>>     ADDED image/canvas widget
>>     REMOVED caching of decoration
>>     SPLIT decoration into border and background that can be rendered 
>> separatel
>
> This shows various objects in the git repo.  Not remotes, that I know of.

Ok, have to get a 'Git for dummies' book sometime. From what little I
know, just like in GNU/Linux everything is a file, in Git everything
is an 'object' right ?


>> I had played around with git some years ago, memory got refreshed that
>> git has some long gibberish number that humans can't understand. I am
>> talking about commit 83ed46469f327a78d3dc839019797ebf56fee470
>
> Every file, every directory, and every commit is a bunch of data
> that has a SHA1 sum.  You can extract files, directory listings, and
> commits and branches via these numbers.  Branch names and tags are
> just convenience names to access these numbers.

true and that's why we love them - the convenience of it.

> Due to this factor, duplication can be removed from the system internally,
> since the same file will be stored as the same git repo object using
> the same SHA1 sum.

Right.
>
<snipped>

> Or maybe: gitk --all ?

Ok, both git log and gitk are awesome.


>> 3. Let's say there is some cmd and I do get the info (something
>> similar to above) and I put these details in the same directory as the
>> game directory just for example say a file which has "Sun Dec 12
>> 13:28:32 2010 +0100" indicating the last time when the commit had
>> changed and some other details. This is just for the self (to keep
>> note/history of when I'm downloading stuff etc.) Whenever I do an 'git
>> pull' or 'git pull origin master' it won't disturb the file and it
>> won't disturb the directory structure which we are clong, right ?
>> Please note that the file is nothing but notes for self.
>
> As long as this notes file has not been added to the git repo with
> git add / git commit, then git won't bother it.  But don't do something
> like "git clean -xdf" which will erase everything that's not part of
> the official git tree.

ok cool, that's cool.

> Hope this helps,
> - Chris

Thanks a lot. It did clear lot of issues for me . Thank you for taking
time to reply .  I hope this is also helpful to some newcomer
developer as well to clear confusion.

-- 
          Regards,
          Shirish Agarwal  शिरीष अग्रवाल
  My quotes in this email licensed under CC 3.0
http://creativecommons.org/licenses/by-nc/3.0/
http://flossexperiences.wordpress.com
065C 6D79 A68C E7EA 52B3  8D70 950D 53FB 729A 8B17



reply via email to

[Prev in Thread] Current Thread [Next in Thread]