I need to apply a patch but:
- The patch (.sh script to run) breaks the website (a little).
- I fixed the pages broke by the patch and committed the modifications in git.
- The patch modify both the file system and database.
- The patch cannot be applied if it detects that some of its content is already applied, which mean I cannot do a
git pull
and then execute the script for my patch. I must apply the patch and then apply my fixes to that patch. - I cannot do a
git pull
once the patch is applied (Your local changes to the following files would be overwritten by merge)
Usually I would :
- Apply the patch
- Do a
git -fetch
- Do a
git reset --hard
The problem is the git -fetch
has no effect:
git log | head
and
git log origin | head
have the same output, though the origin repository is 4 commits ahead (and git knows that when I do a git status
).
What I'm trying to do (TL;DR):
I would like to fetch my last commits from the remote repository so that I can do a hard reset after.