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

[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 (???)
#2

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

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

[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)
#5

[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