Not entirely sure how this situation occurred, though a couple dozen developers plus IT changes may had something to do with it.īefore using reset think about using revert so you can always go back. So what I ended up doing by tracing through the post-receive hook and finding this, was having to go to the remote repository on the server, and there was the change (which wasn't on my local repository, which, in fact, said that it matched, no changes, nothing to commit, up to date, etc.) So while on the local, there were no changes, on the server, I then did a git checkout - some/file.ext and then the local and remote repositories actually matched and I could continue to work, and deploy. What was happening was (I think, not 100% positive) the git post receive hook was starting to run and screwing up due to movement changes in the remote server repository, which in theory, shouldn't have been touched. Remote: error: Your local changes to the following files would be overwritten by merge: Please, commit your changes or stash them before you can merge. So the situation that I ran into was the following:Įrror: Your local changes to the following files would be overwritten by merge: Related: How do I force "git pull" to overwrite local files? Or your file system doesn't support permissions, so you've to disable filemode in your git config. ![]() gitattributes) so it's better to commit what it says. If above won't help, it may be rules in your git normalization file (. If you don't care about your local changes, try to reset it to HEAD (original state), e.g. If you don't care about your local changes, you can switch to other branch temporary (with force), and switch it back, e.g. Do not use this option unless you have read git-rebase(1) carefully. It rewrites history, which does not bode well when you published that history already. This is a potentially dangerous mode of operation. ![]() ![]() This is equivalent to: checkout master, fetch and rebase origin/master git commands. So it'll apply your current branch on top of the upstream branch after fetching. You can try one of the following methods: rebaseįor simple changes try rebasing on top of it while pulling the changes, e.g.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |