![]() ![]() In order to fix this, since the content in O is good for you, but the commit itself is not, you can: Since the history is now different, GitHub (or any remote Git repo) wants you to pull and merge first, then push. if I could prune whatever is after it and just overwrite with my backuped sources.īy selecting amend the last commit, you have actually rewritten your HEAD instead of creating a new commit (which would have been pushed to GitHub without issue) -o-o (origin/master) Unable to push even after git reset -hard 15630f3. Hint: to 'simple', 'current' or 'upstream' to push only the current branch. Hint: specify branches to push or set the 'fault' configuration variable ![]() If you did not intend to push that branch, you may want to Using git reset -hard 12eb50c (the new id) let me recover the latest changes without merge tags, great!īut now, after git rebase origin/master (that messes the files again, but now I had time to backup the files, in a non test case situation.), I get this message from git gui:Īfter I accept it, the push from within git gui stopped working, but command line git push gives me this message: To master -> master (non-fast-forward)Įrror: failed to push some refs to Updates were rejected because a pushed branch tip is behind its remote So, how to make the latest (d8f3505 or fdc9ae1 or another new one as soon I recover the backup again), be the one that will win/overwrite the HEAD? ![]() This command git reset -hard restores the changes at 772a6c0, therefore I lose the latest ones (I still have the backup). This command keeps the merge tags, therefore uncompilable: git reset origin/master So, my latest changes are at d8f3505 or fdc9ae1 (I recovered backups to retry, thats why such number changed). Or * fdc9ae1 (HEAD, master) improving savable helper | * 772a6c0 (origin/master, origin/HEAD) improving savable helper I am the only one committing files, so this is a git gui versus GitHub bug or limitation for sure.Ģ) do ammend last commit (it may or not cause problem)ģ) do git pull (it may create merge tags messing the files, uncompilable, requiring needles conflict resolve)įrom answer git log -graph -oneline -decorate -all, the fork seems very clear: * d8f3505 (HEAD, master) improving savable helper but I guess there is some straight forward way to overwrite the files modified to allow manual merging with my latest proper changes. So I could painfully get my previous commit in some way (using some git command line). So now, my source files are messed (requiring merge, with that merge tags all over preventing compilation), and there are like 20 files messed. GitHub will not allow me to push the ammended commit, it wants me to merge things unnecessarily (because the ammend commit should work, and simply does not). When I remember that this interaction ( git gui vs GitHub) will mess things up, I copy the comment at "ammend last commit" option, and select "new commit" back again, and paste the comment on it.īut right now I forgot and I am on such mess again. When I go to commit and push using git gui, some times I select "amend last commit" just to reuse the commit message at git gui. Many times, instead of promptly pushing, I just code more. That worked for me.The problem is on git gui VERSUS github (when I try to push an ammended commit created with git gui). Since editing either ~/.gitconfig or /.git/config were not viable options, I kept at it and finally got it to work by setting:Įxport GIT_COMMITTER_NAME="Firstname Lastname" andĮxport (with GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL still set), then running the same commit command. This was confusing, since I thought I was providing my identity twice, through the environment variables and the author flag. This still produced an error that included Committer identity unknown and fatal: empty ident name (for ) not allowed (details obfuscated, of course). I tried:Įxport GIT_AUTHOR_NAME="Firstname Lastname" andĮxport and then git commit -author="Firstname Lastname ". Similar to the response by "Raider of the lost BBS" (which I can't reply to, due to insufficient reputation points), but I was on a shared system, which did not have user.email or user.name set. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |