On Friday, January 10, 2014 3:12:37 PM UTC+1, Rev. Brian O'keefe wrote:
> I'm trying to wrap my head around Git and I'm really hoping this is the
> place to go to to do that.
Yes, I'd say so :)
> I'm going to be working with an ESRI Flex Map system. I will have one
> server where the web files reside (html, xml, png, swf, js, etc). Then
> there will be my computer.
> Please correct me if I am wrong, but how I picture this going is as
> *On the Web Server:*
> I will create a repository. Let's call it "*Mothership*"
> This repo is where the original files are. Nobody opens these files.
> *On the Web Server:*
> Then I create another repo, let's call it "*LiveSite*"
> This repo is where the files reside after all approved edits have happened.
> *On My Desktop:*
> Then I create a repo called "*MyEdits*"
> This repo is where I do my editing.
> Please correct me if I am wrong, but how I picture my workflow is as
> *Editing Session Begins.*
> *git pull* from into *MyEdits* whatever resides in *Mothership*.
> Edit my files.
> *git commit*
> *git push* from *MyEdits* to *Mothership* -(?)
> *git push* from *Mothership* to *LiveSite* -(?)
This sounds like the right train of thought, but there are a few problems:
You can't push from Mothership to LiveSite. You have to *pull *from
Mothership to LiveSite.
The reason for this is that Mothership (what many people would term as
being the central repository in this case), is a *bare repository *(meaning
that it doesn't actually have the latest files lying around as physical
files, it is more like a database that contains all the history with all
the changes of a file. The LiveSite repository is a *non-bare repository*,
meaning that in addition to the database, it also has the files "checked
out". And when you push to a repository, it only updates the database, not
the files in the working directory. Hence, pushing to non-bare repositories
is disallowed by default in Git.
> Here is where I get confused? Do I branch?
Unless you have some requirements for special workflow or versioning, you
should just have one branch everywhere called "master" (default branch name
> Can I push from MyEdits to Mothership or do I need to go to Mothership and
> Can I sync up Mothership and LiveSite from MY desktop?
You can push to the Mothership from your desktop (or any other clone),
because it is a bare repository.
> Do I need a Mothership or does Git allow me to just have a LiveSite and
> branch or pull from that for editing? Confused still... help?
Good question. There are a lot of ways to do this (and the way we have
discussed above should work for you), but the most useful/typical aspects
have been discussed here:
If you read it closely, you'll see that your plan comes close to "1.4.2
fetch -- reverse the flow", albeit they recommend a slightly safer
technique (use fetch with reset instead of pull).
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/groups/opt_out.