Welcome Guest, Not a member yet? Register   Sign In
Git advice/tips for Ubuntu & remote server?

I'm posting in Ignited Code because it seems a lot of the devs in here are uber-advanced (and of course, I'm definitely uber-slow! :-S

Trying out a lot of Auth libs, I noticed quite a few files to some of them and wondered if anyone has setup a Git repository on their dev machine? Right now, I can SSH easily into my Fedora but is this making sense? Or am I way off the mark?

(similar to A)

...../siteA (rsync here ?)
...../git_siteA (???)

[eluser]Phil Sturgeon[/eluser]
I deploy all of my websites using Git.

With git you basically have two kinds of repository.

One is the equivilent of a SVN working copy but of course contains local commits, branches, etc. It is mainly just your code with a single .git folder. These are made with "git init".

The other type of repo is less friendly. It contains lots of metadata folders like .objects, .head, etc. This is what you'll have when using a hosted Git repo, so thats fine. If you do it manually, they are made with "git --bare init".

Basically I have a working copy type repo on my local machine and on my live site. When I change my site on my local box I push from local -> GitHub, then oull from GitHub to my live site.

There might be an easier way, but for me this is easy enough. I just SSH, cd to the directory and git pull origin master. Problem solved. :-)

Never thought of doing it that way. That's actually kinda awesome. Thanks Phil!

Who is this Phil Sturgeon guy? Must be new to Codeigniter. Tongue

Seriously though, thanks Phil, it really makes sense. Thanks again for the response/tips.

Dev machine:
/www/siteA (includes .git directory)


Live server:
/www/sites/siteA (includes .git)

[eluser]Phil Sturgeon[/eluser]
Im glad that slightly rambling explanation post helped you guys. I'll write up a proper article on it sometime. :-)

Theme © iAndrew 2016 - Forum software by © MyBB