how can I do "git pull" automatically when my server startup

amazon-ec2, git, ubuntu

Solution

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

Problem

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....

Original source

Related problems