CodeIgniter Forums
Git advice/tips for Ubuntu & remote server? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Git advice/tips for Ubuntu & remote server? (/showthread.php?tid=26868)



Git advice/tips for Ubuntu & remote server? - El Forum - 01-25-2010

[eluser]2think[/eluser]
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?

Fedora_server:
/siteA/www
...app
...ci
...public
.....index.php
.....js
/siteB/www/public
(similar to A)

Ubuntu_dev:
.../home/user/websites
...../siteA (rsync here ?)
...../git_siteA (???)


Git advice/tips for Ubuntu & remote server? - El Forum - 02-18-2010

[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. :-)


Git advice/tips for Ubuntu & remote server? - El Forum - 02-18-2010

[eluser]AgentPhoenix[/eluser]
Never thought of doing it that way. That's actually kinda awesome. Thanks Phil!


Git advice/tips for Ubuntu & remote server? - El Forum - 02-18-2010

[eluser]2think[/eluser]
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)

GitHub:
http:..../projectA

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


Git advice/tips for Ubuntu & remote server? - El Forum - 02-21-2010

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