Currently I do all of my work off of a flash drive. Keeps things portable, and I'm able to learn web development while I'm at work. Currently I run Portableapps with XAMPP, Notepad++, and Chrome installed on it.
My question is, does anyone know of a version control system that would work portably on a flash drive? I just learned about the importance of Version control, and I want to get started, I just need something that will work with my setup.
Edit: Just to clarify, the whole thing should be able to run off the flash drive alone on a completely foreign computer. So if I go to Aunt Edna's house for a family get together, I can go on her computer, plug in my flash drive and just go. The Aunt Edna's of the world get very offended if you install anything but solitaire on their fancy new computer. So it can't leave anything behind
This question was asked before: https://stackoverflow.com/questions/1109838/recommend-portable-source-control-setup and Version control on a 2GB USB drive - the second one has an accepted answer (darcs looks good too).
Pick a distributed one.
GIT or Mercurial for example.
Expanding off of Dan's Answer.
Git is almost completely file based. As long as you have the files, it will work the same with any computer (given you have the command line stuff installed).
This is also good if you switch between a GUI Editor and the Command Line, as pretty much everything will stay saved (the files waiting to be committed, for example)
Mercurial is a good start. A repository does not need to be stored on any server, you just create it where your data files are. Also, there is a nice interface called TortoiseHG, which lets you use Mercurial out of Windows Explorer with ease.
Related
Until now, I always used the FTP transfer provided with Netbeans. Everytime I write and save, it uploads the file to the server.
Now I have a project that me and my co-worker have to work on. The method above isn't the best anymore, because if I do some changes and save, and so my co-worker, we overwrite each other modifications.
What's the best way to cooperate on the same PHP/CSS/HTML project? Could you provide some guide too?
Thanks.
PS: OS Win7.
I personally use Mercurial (Hg) when working on projects with a team.
There is a Tutorial for using Mercurial with NetBeans.
When your team is small you could use bitbucket.org to host your project as it is free and private (but in the free version limited to 5 people per project I think). Otherwise you could easily set up your own hg-server. There are plenty of guides on how to use Mercurial on their website
In case you are not familiar with distributed version controll systems. In a nutshell it works like this:
When a file is created it gets pushed to the server
As people make changes to their local copy of that file (or the files) they create changesets which contain only the changes they made.
Everyone pushes theis changesets to the server from time to time and pulls the changes the others have made. The changesets are then merged to contain everybodys changes.
The files on your computer are updated according to the changesets you have pulled so that everybodys files are up to date.
This works pretty well as long you don't edit the same lines of code (because then the automatic merging fails because it doesn't know what to keep and what to discard and you have to merge manually) and your files are not in a binary dataformat.
But in your case HTML, PHP and CSS are all text based so you are good to go.
I hope this helped. If you have any questions feel free to ask.
Sorry I could not post more links because my reputation is too low.
I have seen a few that only have the checkout functions and options to view the diff and revisions but none with the option to commit changes, so my question:
Any PHP svn GUI with commit functionally?
Update:
to simplify even more:
i need a browser-based interface to a SVN repo that supports write operations, do you know of any?
I suspect the reason one doesn't exist is because it'd be clumsy to use.
You wouldn't have direct file system access (I don't think even Flash or Silverlight provide that, but I could be wrong), so you'd need to upload the files you want to commit or diff.
If you're not using any browser plugins you'd be further limited to uploading a single file at a time, which isn't the way SVN is meant to work. You commit a whole changeset, not one file at a time.
The only feasible way to do this I guess is to have your working copy also on the server and do your editing in the browser as well. At which point though you're not looking for just a web SVN GUI, you're looking for a web-based IDE that has SVN support.
--Edit--
The closest I've been able to find is this http://kodingen.com/ which is still in beta, and looks like it plans to have SVN support but it's not currently available in the beta version (at the time of this answer)
I am a web freelancer and had been doing all coding by myself using netbeans (set up to use a remote server (ftp)).
Recently, I started working with 2 other guys. They help me with php and css. The problem is that sometimes we want to work at the same time. Obviously one can immediately see the problems were having. Files being over writting / lost.
What do you recommend we do? Is there something like netbeans that allows checking in and out of files. I like netbeans as my editor and would prefer to keep it.
To give you a little extra information on our workflow. Usually I set up a dev site (generally a subdomain, dev.site.com) and a live site (site.com). All work is done on the dev site which I then move to live site once all is finished. I never use localhost sites.
Also
Surely you need a version control system. Subversion and Mercurial (amongst others) integrate fairly well with Netbeans.
Simply use some versioning system to prevent data loss.
Git
CVS
SVN
Other option is to use some file locking system.
Take a look at some source code management tools. Netbeans supports at least SVN and CVS. They should be listed under the Team menu. It has a FAQ on which it supports
Sounds like a job for Github
Assembla provides a free SVN hosting for collaborative projects.
I have a rather large php project with all kinds of different third party includes. Its all managed with Netbeans PHP. I have a few problems i would like some oppinions on.
Does anyone build there php-project? When i upload to server via ftp i get all kinds of project files which doesnt belong to live environment.
Would be nice if a build solution could encode all files when building (actually copying files to new location and leaving out project files and files like that).
Let me hear how you handle your php projects (development, test, build/deploy) with OS X.
Thanks
Well you could write a shell (or scripting language of your choice) script to selectively copy the files you want to your remote server.
Alternately, you could put the code to be published (again, leaving out the undesired files) into a version control system (git, svn, etc) and pull the code to the remote machine that way. There are lots of other benefits of using VCS as well.
You could also use something like ant to write a "build" script which does any manipulation needed for deployment.
I use Eclipse PDT and mount server with Macfusion. Eclipse File Sync plugin then syncs everytihing to mounted drive (can exclude unwanted files/directories).
Also using a SVN and opening project directly from remote drive with Eclipse and including libraries from project properties. So there is two projects - one for local development and other is live in server - syncronized with SVN
(Eclipse plugin Clay for database diagrams is awsome too)
Though I am not an OSX user I am a Mac-in-the know. Basically I get invited to their house parties and politely decline to run amok with Windows and Linux/Unix (who is OSX's older sister, it is all so very confusing). In any case, Mac adds extra files to everything. I know when a designer is using a mac vs a pc. I get extra files and directories in their attachments if there is a folder. As far as project files, there needs to be a way to set up netbeans to keep the files for project in a different location from your working on files. If not then shame on your IDE. Well, if nothing works, since Linux/Unix is close to my heart I can write a script for you to pull all files of a list of extensions out and copy them to a new directory with subfolders in tact. Here ya are:
This should work
find . -name '*.php' | xargs rsync -avuzb '{}' exportdirectory/
I do not have a machine to test it on right now and Cygwin, for all it's effort just fails sometimes. Let me know how it goes, otherwise use Unix wizardy :D Because yes, as we know OSX uses Unix command line. The crude script is mainly to give you an idea of a way you can do it. I am sure there is php, html, css, js, and other files and on rare occasion (god lets hope not) just knowing extensions isn't going to be enough.
Personally I use gvim and refuse to use project managers, I use gvim and command line and though I have used both, I am highly preferential to the current way I am doing everything. Hey, it's a choice though. No criticism here if you walk another journey.
I've decided to code some applications in PHP that are supposed to run offline in the user's machine. However, I can't seem to find an user-friendly install wizard to create a local server in where the script will run. Any ideas?
PS: Here's an example of what I want: http://www.nolapro.com
You could go to the old school route and try using PHP-GTK.
Text Tutorial here: http://www.kksou.com/php-gtk2/References/Compiling-standalone-PHP-GTK2-applications-on-windows-using-PriadoBlender.php
or you could go the route that I believe has much more promise: Adobe AIR + PHP
It has the added bonus of running on any platform!
Video tutorials here: http://www.vtc.com/products/Adobe-AIR-PHP-Development-Tutorials.htm
There's also a new player in the game, Appcelerator. It lets you write your code in whatever language you want (PHP, Ruby, Python, etc) and compile it for the platform of choice (iPhone, Android, Windows, OSX). Parts of it are still beta, but it looks unbelievably slick & cool, and there are lots of tutorial videos. http://www.appcelerator.com
I hate to advocate this, because it just feels so wrong. You would probably be better off using a language inteded for use for stand-alone applications, if you're going to be doing this often or in a production setting.
With that said, a colleague of mine used to use the Bambalam PHP to EXE Compiler for this. He actually had a profitable product built around it.
Bambalam will generate an EXE that doesn't rely on any external DLLs, based on your PHP code.
http://www.bambalam.se/bamcompile/
If you have a webapp written, you maybe want to deploy on client, a possible way is use wapache, which is a standalone apache bundled with your application, and an integrated (IE) browser control inside.
http://wapache.sourceforge.net/
A new feature of PHP 5.4 & 6 can help you, the builtin web-server.
http://php.net/manual/en/features.commandline.webserver.php
With this feature you can host locally your php app without external webserver, and access on localhost.
If you really talking about a client application you are really wrong to do this.
If you want to wrap a server + browser to deploy your web based application so it runs local you might check out three options:
1) Deploy a simple webkit browser (you can get a QT Webkit Browser in 30 lines of code) and an apache server that is installed somewhere standalone (not via the apache control script as this uses port 80 and i probably conflicts with another installed webserver.
2) Look at the Firefox PRISMA solution. I have read about this only in a news article but it wrapps the firefox around one single start URL. You have to deploy a webserver in the same way as
3) Try to wrap it as a HTA application. Search the corresponding info on MSDN.
I would prefer (1) as you can add special application interacting code as needed.