I’m wondering if anyone has a good solution for when you’re working as a team and there’s a single file used throughout a project (like a styles.css file) and everyone needs to use it throughout the day – inevitably someone will make changes and save without grabbing the most recent version first. Is there some sort of group editing program for Windows/web? We currently just access the CSS files via FTP & edit in our usual editors. Probably an editor that can load & save changes on the fly?
6
Use Git.
Git is a version-control system that has features specifically for this purpose. You can make changes to a file concurrently, and then Git tries to merge the two together automatically. When it can’t merge them reliably, it tells you there are conflicts and asks you to resolve them.
I say use Git over other version-control systems (SVN, CVS, etc..) because in my experience, Git’s merging capabilities are better. It has always seemed to be able to automatically merge stuff better than SVN. That may have changed since I last used SVN, however.
5
Use version control.
If you find your team is uncomfortable with merges and it doesn’t cause too much of a bottleneck, you could use a VCS that supports locking such as SVN or Veracity.
In Veracity, the workflow would be something like:
vv lock styles.css
# make changes to the file
vv commit
vv push
Each team member must remember to lock the file before editing. If someone else has the file locked they will be told to wait their turn.
This is a notably succinct, demonstrative, explanation of the problem, the potential solutions, and in my opinion; and contrary to Joel’s exuberance about his new Mercurial tool; a fatal blow to the entire idea of getting out of multi-user editing conflicts easily.
http://hginit.com/04.html
Note the ‘graphical tool’ that Joel uses when a merge conflict appears. This is virtually no improvement on Visual SourceSafe, which has been maligned for decades, but still serves it’s essential purpose. But that purpose is not merging automatically. Without proper architecture of your CSS classes / files, source control is hardly going to help you.