I am using ec2 instance @ ubuntu . I am trying to automatically do "git pull" after i launched a new instance from my AMI. The repo dir is already in my AMI, all i need is update the repo.
what i am doing now is I put "git pull origin master" in rc.local.... but it doesn't work....
I got it to work..
sudo -u ubuntu -i git --git-dir=/home/ubuntu/blastoff/.git --work-tree=/home/ubuntu/blastoff/ fetch origin sudo -u ubuntu -i git --git-dir=/home/ubuntu/blastoff/.git --work-tree=/home/ubuntu/blastoff/ merge origin/master
git --git-dir=some/dir/.git pull origin master
should work
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