I have a remote production linux web server. On it, I have this setup implemented: I have a prime repository in web root, and hub attached to it. I also have a stagging .dev domain setup for a site, and in the webroot of that domain I have another repository. I push tested changes from it to hub, and then they are automatically pushed to prime. So far so good.
I have two PCs from which I do development (desktop and laptop, both Win). My IDE is netbeans, and I work with remote projects there, over ssh. Everytime the file is edited in netbeans, it automatically uploads it to the stagging repository, so I can test immediately, without any commits. Then when I see the feature is good, I commit, and after testing I push it to hub, then to prime.
This used to be very convinent for me, before I started to work with branches a lot. Everytime I checkout a new branch on the server, I have to re-download the whole project to netbeans, and I often forget to do that. Also when I work from another PC, I sometimes forget to re-download the project also.
I could use WinSCP+Notepad++, as I used to do before, but I'll miss the coolness of netbeans than. I could work via shell and vim all the time, but I'm not cool enough for that. If I set up a local repository, then I'll have to push every change for testing, which is stupid and dirty. Maybe use Dropbox to store a repository and auto-sync? Again, I'm totally satisfied with the server part, the local editing is the problem.
How can you advice me to improve my workflow?
OK, a month later, I'm 100% satisfied with the approach I had taken, and I didn't find any side effects of it.
I put my git repositories in Dropbox folder on the server (Centos). Then, to my local developer machine, these repositories are synced automatically. I open the synced projects with NetBeans, and work locally whether I'm online or not. When I'm online, changes are seamlessly synced to the server, so I can right away see the changes and test on a .dev domain. It takes about 3sec for a small change to be synced with the server.
I can work with git repository either locally via Netbeans, or on the server via command line git. I prefer committing and switching branches on the server, and locally in NB I review the changes, use visual diff etc.
This approach works really great with above mentioned workflow
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