I'm working in a web agency with a small team (5 developers, 2 designers). We primarily work with PHP/MySQL web applications including Magento, Experession Engine and CakePHP. We use a combination of Windows 7 PC'S (developers) and Mac's on OSX (designers).
I've been looking into using github for our projects with 3 main goals:
To see who has edited files and allowing people to comment on files.
To avoid overwriting each others work as it's sometimes the case multiple people can try and work on the same file at the same time.
Allowing rollbacks to previous versions of a file.
This is our current workflow and I don't understand how github fits in with this at all. I realise that our workflow will need changing but I haven't been able to find a process which in any way seems to fit in with this:
All our work is done on a remote web server which is specifically for development (nothing "live" sits on here). The server is running Apache, PHP, MySQL, etc. Nobody has a local development environment set up on their machine and we don't want that if possible.
We all have FTP access to the development server mentioned above. We generally edit files directly on this dev server as it gives a very quick way to test things out (literally edit a file, upload it and run it in the browser). There are problems with conflicts, e.g. multiple people trying to edit the same file, which is why I'm looking into using git.
When everything has been approved on the development server it is made live by copying it to a different server. The live server can be anywhere - we use some servers we manage ourselves, sometimes we use third party hosting companies - it varies.
I've been looking into this for the last couple of days and all the approaches I'm finding seem impossible for us to use. Does anyone have any insight into the best way to achieve this? Or am I looking into something which isn't even applicable for the issues I'm trying to resolve?
I would appreciate any useful advice people can offer.
Thanks.
Not only does it allow you to maintain discrete versions of the application you are developing, it also has a built-in tool for comparing files, called “diff.” This tool will reveal the files that have been modified between commits and show exactly which lines of code were changed.
To add a new remote, use the git remote add command on the terminal, in the directory your repository is stored at. The git remote add command takes two arguments: A unique remote name, for example, “my_awesome_new_remote_repo” A remote URL, which you can find on the Source sub-tab of your Git repo.
A git remote command is used to make the remote connections such as connecting a Git local repository with GitHub remote repository.
We have a very similar set up in the company I work. We actually have a different sandboxes on the dev server. In other words, we clone the repo into different sandboxes. Each developer/designer gets a sandbox. For example if there are 3 developers, there will be 3 sandbox directories + 1 staging directory
So, developer john gets /home/john/example.com and it can be viewed at john.example.hot (setting up vhosts) mike gets /home/mike/example.com viewed at mike.example.com tracy gets /home/tracy/example.com viewed at tracy.example.com And there will be one additional staging directory. /home/staging/example.com staging.example.com
Staging merges all the changes together so it can be tested. All of these directories are accessible only with internal IPS.
We deploy these changes to production using RSYNC. More information here about RSYNC: http://www.cyberciti.biz/tips/linux-use-rsync-transfer-mirror-files-directories.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With