I’m pretty new on UNIX/GIT world.
I’m trying to setup a GIT repo on a Amazon EC2 Machine so I can work on my projects from different places with ease.
After some hours of work some things are ok, I managed to connect to the repo with my IDE (Netbeans) and clone the remote content.
The problem start when I try to push something to the remote repo, Netbeans give me an error and this output, with a generic error:
==[IDE]== 4-lug-2012 15.34.59 Pushing
git push ec2-xxx-xxx-xxx-xxx.eu-west-1.compute.amazonaws.com:/var/www/myDir/ +refs/heads/master:refs/heads/master
Remote Repository Updates
Branch : master
Old Id : 84c3fb34b54b501b52c914eca123d4d850688e26
New Id : 7e7fd752d2cde7b0bf8824eef83c535ee2418508
Result : REJECTED_OTHER_REASON
Local Repository Updates
Branch : origin/master
Old Id : 84c3fb34b54b501b52c914eca123d4d850688e26
New Id : 7e7fd752d2cde7b0bf8824eef83c535ee2418508
Result : NOT_ATTEMPTED
==[IDE]== 4-lug-2012 15.35.02 Pushing finished.
I’ve read around about make the remote depo “bare”, the git push succeed in this case but the file isn’t updated anyway… what I’m missing?
Thanks for the help!
Is your EC2 instance also where your code is used for production? If so, then you’ll need a bare repository on your EC2 instance to handle the commits and another git clone (of the bare repository) to provide your production code.
Work flow:
*Obviously you don’t want the pull to update your production with HEAD/master – so ensure that you’ve got a branch/tag for production or for development.