-1

I am in love with sublime text, use CodeIgniter on a WAMP & a LAMP (Ubuntu) machine. PHP is my food, obvious cz I use CI.

Scenario I work on 3 servers.

  1. Desktop - Apach MySql (Development)on Windows 7
  2. Laptop - Apach MySql (Roaming Development) on Ubuntu 13.04
  3. Cloud Server - Apache.MySql (Production) on Ubuntu 12.10

Problem

Everything is good when I have Sublime Text open on my desktop and I am happily making that website over CodeIgniter, but next moment when I have to get to bed with my laptop everything is gone. I feel lost seeing the code on my laptop is not updated with the ones I made on my desktop.

Then i have to go log into my desktop's file server and download the updates. Most of the time the whole website folder when am not sure to which files I updated. Next comes database. I log into my desktop's MySql server from laptop and download the whole database and update my laptop's existing one.

Solution For

I want a setup that can automatically sync all my files the moment they are updated, on both my development server and should have an option to replicate the changes to the production server as and when I command it to. I did research and found something called Git & GitHub to be somewhat my solution but I got no idea of what these three letters G, I & T mean and how to implement them. I searched the web but got nothing but boring black & white text explaining it which I find hard to grasp.

While answering please note the OS on my system.

VenomVipes
  • 39
  • 1
  • 10

2 Answers2

2

Git can help you with version control and with web site deployment.

More information on Git

More information on using Git to manage a web site

But I'm afraid you will have to read some of that boring black & white text. ;)

Community
  • 1
  • 1
Klas Mellbourn
  • 42,571
  • 24
  • 140
  • 158
  • @VenomVipes I would not recommend using Git to version control database files. You could certainly use Git to version control the SQL scripts creating the database. It is a bit unclear to me what your "database problem" is about. Could you clarify? – Klas Mellbourn Jun 21 '13 at 17:22
  • @VenomVipes:if you dont mind cn you plz explain TwoWay Replication on MySQL server.. – HIRA THAKUR Jan 14 '14 at 16:08
0

The whole idea of git is to take a snapshot of your project at different time intervals so that if anything wrong happens, you can restore the project’s state at a particular time in the past. Git is also useful in situations like when there are two people editing the same website. They may pull the same file, edit it, commit changes and then push it to remote server. If they are using FTP then it is possible that they may overwrite each other changes. But if they are using Git then it will try to merge these changes.

Read this great article

Cody
  • 2,480
  • 5
  • 31
  • 62