Reputation: 2355
I have a single git repository on my local machine. When I'm done working on a feature, I commit and push the changes to one of 2 'bare' repos (production and staging).
The post-receive hook deploys the code after push from local. It works well, but I need to get any changes that happen on the 2 remotes (production and staging), such as when a user installs a new extension. I need to be able to 'pull' those changes to my local.
Should I convert the repos to each have a working tree? Can I pull the changes on the remote repos into the code base? I realise you may have questions about my setup but I dunno what you need to know, please ask. Thank you for helping me understand this!
Upvotes: 1
Views: 112
Reputation: 2355
So here's the answer: you CAN pull from the repo in this instance. The key is; rather than push from remote, you need to pull to local. ie (on local):
git fetch origin master:master
Hope that saves someone else some time ;)
Upvotes: 1