Search

This is perhaps more of a git question than a symphony one, but it’s related to my attempted extension development so I thought I’d ask here.

In a nutshell - if I create a local git repo to develop locally on my machine at work, is it possible/safe/recommended to copy the whole directory to a thumb drive so I can take it home, continue development there, potentially bring it back to work, and so on?

If I’m not going to have a centralised/hosted repo (yet) then this seems to be the obvious thing as long as git repos are self-contained and don’t have any other bits left elsewhere on my filesystem.

Many thanks in advance.

It sure is, copy it to your thumb drive, and then when you get back to work add your thumb drive as a remote and pull the changes from it.

git remote add thumb /path/to/usb/awesomeness
git pull thumb master

And when you leave for the day, change into your thumb directory:

git remote add work /path/to/work/copy
git pull work master

Done!

Or that ;-)

as long as git repos are self-contained and don’t have any other bits left elsewhere on my filesystem

Correct. There’s a hidden .git folder in the root of your repo which contains everything. So long as you take this folder with you it’ll keep your commits. So if you took it home, worked on it (making commits) you could overwrite everything (the .git folder included) in your work machine when you returned.

Or, you could get really tricky and generate an email patch at work, and email it home. Then apply the patch to your repo at home to get the changes. (more info)

Another thing you could try is something like dropbox to keep your home and work repos sync’d up.

Thanks for all the suggestions, it’s clear that it’s possible by various means. I’ll have a play and see how I get on, be a good learning experience for using git.

Could you not simply setup a private repository on github.com? Sync from work. Sync at home.

Github doesn’t offer private repos in the free plan…

That’s another option Joe, but I just want to have a play offline and get used to using git before I sign up for the almighty sum of $7 a month for private repos.

No doubt that’s what will happen eventually anyway, I ended up using hosted SVN in the past for exactly the sync-ability you mention.

@Joseph Sure but you have to pay. They have some good plans.

I set up my own private repos on a shared hosting account I have with Joyent. It is set up by default with Git, so I just followed their instructions to set up a git repo and I can even update my sites by using a git push to update ensembles. That way, if GitHub ever goes down, I have a backup repo that I can continue to use.

Or, I’ll zip up a directory and pass it around with DropBox, email, whatever. Git is very portable.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details