i have a bash script:
cd ~/www/myprj
pwd
git pull https://usr:psw@bitbucket.org/myusr/myprj.git
git checkout branch2
git log --oneline -n 15 --pretty=format:'%h %ar [%ai] (%ae) %s' --date=short origin/branch2
which i used to run from a php script using:
<?php system("bash ~/private/pull.sh"); ?>
I used it to pull all changes from a remote bitbucket repository and updated development version of the project. However, since recently it stopped working. After trying to trace the problem and running the commands from the terminal I found that the git pull
is trying to merge the latest commits although there are no local changes?
Any idea of how can I just force the git pull
and ignore local changes? or is there any other way to pull the changes without merging?
i tried git pull --no-edit
but it didn't help me