On Wed, Jul 4, 2012 at 10:08 PM, Ben Caradoc-Davies <
[email protected]> wrote:

> Justin,
>
> I have a couple of git questions and I am hoping for some best-practice
> guidance:
>
> (1) If I cloned from my forked personal geotools repository but now want
> to change my local master to track the main geotools repository, what is
> the right way to change my local master? Just delete it and recreate it
> from the new default remote like this?
>
> git branch -d master
> git checkout -b master geotools/master
>
> Does this fix the remotes to be equivalent to a fresh clone? Or will this
> have unanticipated side-effects?
>

hmmm.... well if you are always explicit about specifying a remote (like i
am) then it doesn't matter since the master in your repo and the master in
canonical are the same branch because they have the same history. But i
guess my answer would be to clone the canonical repo directly, checkout
master, 2.2.x, 2.1.x, etc... then they will be created from canonicals
remotes. I am sure there is a nicer way to do this but i have never done it.

>
> (2) I got all the new branches from the geotools repo with "git fetch".
> What is the right way to push branches into my forked personal remote on
> github? Check them out and then push them? Is their an easier way to
> mass-update a forked personal repository with upstream branches? Is there
> any reason to do so?
>

I don't ever use git fetch directly. Git pull is a "git fetch" + "git
merge" all in one. I find it easier and safer to just always use pull. As
for mass pulling / mass pushing I imagine there is probably a way but
myself i never do that. I always just push/pull a branch explicitly. I
never push the primary branches (master, 2.2.x, etc...) to my fork, only
feature branches so i don't really ever keep them up to date. And vice
versa. I don't ever push feature branches to canonical so i don't find it
necessary to sync up that way either.

>
> (3) Does a forked github repository have any concept of remotes, and any
> tools for acting on them from the web interface?
>

A remote repo on github has no notion of a "remote". A remote is just in
your local repository and are just pointers to remote repositories.

>
> Trying to merge into my mental model.  :-)
>

Hope that helps :) Someone more versed in git theory would probably give
better answers.

>
> Kind regards,
>
> --
> Ben Caradoc-Davies <[email protected]>
> Software Engineer
> CSIRO Earth Science and Resource Engineering
> Australian Resources Research Centre
>
>


-- 
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to