The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Operating Systems
> Linux Help
|
Version Control (Git) For Web Projects
Discuss Version Control (Git) For Web Projects in the Linux Help forum on Dev Shed. Version Control (Git) For Web Projects Linux Help forum discussing topics including usage, troubleshooting, modules, and distributions. Linux is an open source OS, based on UNIX.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

May 19th, 2011, 06:40 AM
|
|
|
|
Version Control (Git) For Web Projects
I'd like to use some version control with my web projects, but I don't want it to get in my way. Right now if I make a change to my project I have to commit it before I can view those changes live on the development server. I'd like to simply be able to save a file, which then pushes it out onto the server. Then, at my choosing, I can commit my project to the repository. Any suggestions?
I'm using:
Ubuntu 10.10
SSH (Public key)
GIT
Apache/PHP/MySQL
|

May 19th, 2011, 12:18 PM
|
 |
Wiser? Not exactly.
|
|
Join Date: May 2001
Location: Bonita Springs, FL
|
|
|
Either do your changes on the development server, or setup your own local server on your PC to do your dev work. Once your happy with the changes, commit them.
|

May 19th, 2011, 12:33 PM
|
|
|
|
Working on my development server won't work - it's just a console-only VM.
Working on my PC won't work - It's a windows environment and doesn't have all the necessary software (PHP has various EXEC calls to programs installed on the server)
However, I have thought about it a little and understand what you're trying to say. There are trade-offs to consider, but this might work:
1. Install samba on server
2. Install git on all client workstations (single developer, multiple workstations)
3. Set up a git repository in /var/www/project
4. Directly edit files in /var/www/project vis Samba when developing. This makes the changes testable on the development server.
5. When I'm happy with the changes I've made, use git to commit.
Now I can edit directly on the server AND I get the benefits of versioning, branches, etc...right? I realize this is not a solution in a multi-developer environment, but I believe it would work for just me.
|

May 20th, 2011, 01:01 AM
|
 |
Code Monkey V. 0.9
|
|
Join Date: Mar 2005
Location: A Land Down Under
|
|
|
If you are doing the work on the live server the best option that you can have is to use whatever text editor program is on that server to edit the files. You can do this through SSH or remote session or any one of a fair few other options.
Personally, I'd look at setting up and using a REAL dev server for this. That way you can set it up just like your production server, do the changes on there and when they are stable, push them live. This will save you a lot of grief when you do get something wrong that updates/deletes live data (or whatever else). I've done that myself, so I know just how easy it is to destroy things that you didn't want to when you do it like that.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|