I have 3 repos. A bare repo which I use as a master repo, a dev repo in which I make and test changes, and prod repo from which scripts are executed in the prod environment.
After I have tested changes in the dev repo I push them to the bare repo and they are auto pulled down into the prod repo on a cronjob using a basic script (carrying out git pull command).
I followed through the above procedure for a change, but the altered file will not update in the prod repo.
Using git extensions for a graphical view, it appears each repo is up to date and at the head.
I've tried:
git checkout HEAD
git pull origin master
git reset --hard HEAD
git reset --hard origin/master
git reset origin/master
Can anyone help here?
This question is related to
git
repository
checkin
Try this:
git fetch --all
git reset --hard origin/master
Explanation:
git fetch
downloads the latest from remote without trying to merge or rebase anything.
Please let me know if you have any questions!
For me my forked branch was not in sync with the master branch. So I went to bitbucket and synced and merged my forked branch and then tried to take the pull. Then it worked fine.
Source: Stackoverflow.com