I'm currently developing a website using PHP/MySQL using Adobe Dreamweaver and has been asked to use a form of version control like SVN. I'm currently on a shared host Hostgator, how do I go about setting up SVN if it is possible. On their FAQ for SVN, they mention that they support the client not the server.
Are there alternatives to SVN? Can Github be used? I need my code to stay private not public...
EDIT: Is it advantageous to have the version control integrated into Dreamweaver?
Are there alternatives to SVN? Can Github be used?
Mercurial, git, CVS, bazar, ... just to mention some alternatives. Github can be used, of course, but this requires git to be used instead of SVN. In any case you should ask "the asker" (chef or customer I guess), if it is ok for him.
You have to install SVN server on the server machine and SVN client on your development machine. It free, so may be a good option.
Have a look here, tortoise SVN.
If you need your code private you can just use git.
write git init /location_of_project in command line and voila, local repo created.
read more info at http://git-scm.com/documentation
Github uses git for version control. You can use Source Forge for this purpose. Source Forge is a free project hosting site which uses SVN.
I love Cornerstone for OSX. Easy and intuitive for my needs which includes a local, private repository.
Related
I am currently interacting with my sites via FTP, which can get quite annoying and impossible to manage at times.
Is it possible to use GitHub as a version control system for my PHP based websites which is on a different domain name?
If not, can anyone give me some advice on what tool I should look into using in order to set up version control.
You can create a git repository with all of your code for your website, and host it on Github. Then you can make changes, commit them to your local repository, and push them to Github. Afterwards, when you want to deploy your changes, do a git pull on your Github repository from the remote server.
Git is a distributed version control system. You have local repositories sitting in your local machine (your laptop, desktop, etc.) Github is a remote repository hosting service (sort of like Dropbox). When you want to sync the repo in your computer with the one hosted by Github, you do a pull/push. Then, you can sync the repository hosted by Github with the thrid repository on the server that hosts your website using a push/pull. No ftp is needed.
After a bit of research, found the solution to my question.
http://net.tutsplus.com/tutorials/tools-and-tips/how-to-use-git-with-ftp/
I do some android work on my desktop and I am starting to do some PHP work on a website. I just started doing some collaboration with some freelancers on both platforms. I would also like to do more coding on my laptop (android and eclipse export and importing is annoying). I have a GoDaddy shared hosting and a neglected Ubuntu 11.04 server at home.
I need to setup something to make this all easier, should I do some sort of SVN? I don't make much money on my projects, so I don't want to pay for an online repository. Any suggestions?
Bitbucket would be your best bet which is free for private repos and uses git
A DVCS such as Git or Mercurial. Both can have online repositories set up on any server with shell access.
You can go with free svn/git provided by assembla and you can select free plan also from this link http://www.assembla.com/catalog/tag/Free?type=private
You can try git free version needs to be open or google drive could be a.better option as its free, its desktop app could automatically sync your data online.
We are two in a team working on the same project. i am on MAC and the other one is on PC. i have never used SVN before. googling about the SVN gave me basic understanding about svn. and what i understood is there should be subversion installed in client machine (i do not know which client, i assume there are many like versions and cornerstone for mac, tortoise for windows etc. and i require a repository where i will host the centralized version of the application. the client will get the copy of codes or files where they can commit the changes to repository (main application). which can be undone if required. however what i don't understand is, as our PHP code uses database(mysql in my case) how is it managed by SVN client?
lastly i expect my development environment to be implemented the following way.
i want to set up my mac as development server for SVN at the same
time i would like to work in the same machine making use of SVN.
PC should access the repository from MAC and commit the changes.
all the setup should be done and implemented locally via LAN. please correct me if i am wrong on my understanding about the svn and also do guide me about the requirements and resources i need to install in both the machine for me to get going using SVN for my projects.
thank you..
You can use your Mac both for hosting your SVN repository and also use it as the client to checkout your working copy. Have a look at this link (its slightly old but you'll get the gist).
Once you have the SVN repository setup you can enable HTTP access on it so that your partner can checkout the copy and commit changes to it. Have a look here on how to enable HTTP access for your repository.
Most modern day PHP Frameworks use migrations scripts that help in building and maintaining your database schema, if possible use a framework. Have a look at the migrations script of one of the frameworks for inspiration (i.e if you can't use a framework). Migration scripts under the hood fire create table or alter table commands, and all you do is add the migration files to your SVN repository to version control your database schema.
One caveat with hosting the SVN repository on your Mac is that for some reason if its down, your partner gets stuck as code changes can't be committed and new changes can't be checked out. Have a look at this thread for free online private SVN repositories. In case you want to go the paid route GitHub.com is awesome.
I develop on my own and use a repository hosted on http://www.springloops.com. On here I just export the database to a text file and keep historic changes to the database on there. Clearly this is not suitable for a team working together on a project unless you're well coordinated in recording your database changes.
This question looks useful MySQL Version Control - Subversion though it's specific to mysql subversioning - not quite the answer to your broader question.
Each machine should have the relevant Client software, I recommend Tortoise SVN for Windows - it's pretty popular. There is bound to be a similar alternative SVN Client for OSX that you can get your hands on.
I code all by myself, and I have 1 website . but i dont ever use subversion or github. Question is:
How to develop on souce code of my website server and update it when develop complete.
In this case , should use github or subversion.
Truthly , i read and using github then try to create repository but anyone can watch mycode . I dont want that.
I want 1 guide easy for very begin about this.
You can use Git locally. So no need for Github. There is a video serie on www.tekpub.com about Git.
SVN and GIT are two completely different types of code repository patterns. If you using GIT you don't need a central server and can create a repository locally on your machine. I recommend you get familiar with this website just to get a basic overview of what a DVCS is and how it can affect the way you code.
HgInit
The good news is that you aren't familiar with any VCS (I assume) and that means you won't get mixed up when trying to learn GIT coming from SVN.
Assuming you already know the basics of how to commit/push/etc with git, which your answer suggests you do, the problem is that your repo is set to be public and not private. You can change this on the repo's admin page, assuming your github account has enough private repos left (The lowest account level that supports this is USD$7/month iirc). There are other git hosts which you can use for free that provide private repos.
As Roger said, you can use Git locally and do not need a server for that.
For SVN you need a central repository server, that usually does not correspond to your live webserver.
You will need a running Apache server and install SVN as an additional module for it. Once you have a subversion server running, you can then add repositories to it, normally one repository per project.
Usually you would have a local subversion installation on a development server in your local network or even (as you work alone) on your local machine, using a distinct host/port configuration for SVN, e.g. you could use localhost:80 for your development of the live website, and localhost:9999 for your SVN installation. There are several guides for installing SVN on Windows, Linux and MacOS found via google.
Both version control systems require some initial work to get it, but I personally prefer Git over SVN. Check out the Git guide on stackoverflow or the SVN book.
Personally, I find SVN easier to learn and install than GIT (but I guess that depends on person ;) and OS - I'm on windows unfortunately)
That's why I choose some free personal host for that. I tried BeanStalk and XP-Dev. The first one, is cleaner and much more user-friendly... and offer GIT or SVn ! But you got only 1 personal project available for free.
The second one is ugly but quite performant, 2 personal projects but only with SVN for free.
After trying to get the mercurial repository explorer setup on my shared hosting with no luck, I have decided to try and write a module for our Intranet that will act as a repository explorer.
Is it possible for me to get changesets from a Mercurial repository without Mercurial installed on the machine?
Thanks for any help!
Metropolis
Definitely, but you probably don't need to do that. Mercurial has a static-http:// mode where it will let you clone and pull from repos that are merely sitting on an available web server. It's slower, but it works.
That said, folks have found that with enough work they can get all but the most restrictive shared hosting systems serving up hgwebdir.cgi.