linking github to my server
Github tracks my changes and makes it easy for me to "upload" only files that I've worked on to the repository.
However then I have to upload them to my development server as well if I want to see them work.
Is there a way to have the git clie开发者_如何学Cnt push to my development server as well?
How do others handle this issue of efficiency?
You have to add a remote to your development server ( to the repo on the server):
git remote add devel url_to_repo
Once that is done, you can easily push to the development server:
git push devel master
If you are having a bare repo on devel ( as it ideally should be), you should write a post-receive script to checkout the files.
You can just push to all remotes like this:
git remote | xargs -n 1 git push
This will go through all your remotes and push up your changes to each.
This assumes that you set up a remote for your development machine.
精彩评论