After rewriting the commit tree to rename the author and change the email, my local repo and remote origin are out of sync. I am the only developer and want to push my local repo to origin, updating origin/master to my local master branch. Here's what I have tried without any success:
LibGuest08@LBP-NW0345QZMH1 /e/devel/src/java/bbct (swing.0.5.2)
$ git push
Password:
To ssh://codeguru@git.code.sf.net/p/bbct/code
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'ssh://codeguru@git.code.sf.net/p/bbct/code'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. If you did not intend to push that branch, you may want to
hint: specify branches to push or set the 'push.default' configuration
hint: variable to 'current' or 'upstream' to push only the current branch.
LibGuest08@LBP-NW0345QZMH1 /e/devel/src/java/bbct (swing.0.5.2)
$ git push origin master:master
Password:
To ssh://codeguru@git.code.sf.net/p/bbct/code
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'ssh://codeguru@git.code.sf.net/p/bbct/code'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and merge the remote changes
hint: (e.g. 'git pull') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
LibGuest08@LBP-NW0345QZMH1 /e/devel/src/java/bbct (swing.0.5.2)
$ git push -f origin master:master
Password:
Counting objects: 464, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (148/148), done.
Writing objects: 100% (452/452), 470.65 KiB, done.
Total 452 (delta 268), reused 417 (delta 247)
remote: error: denying non-fast-forward refs/heads/master (you should pull first)
To ssh://codeguru@git.code.sf.net/p/bbct/code
! [remote rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'ssh://codeguru@git.code.sf.net/p/bbct/code'
LibGuest08@LBP-NW0345QZMH1 /e/devel/src/java/bbct (swing.0.5.2)
$
I also pulled origin as suggested, but that does a merge with all the commits, some of which have the wrong author name and email. How do I sync my remote origin repo with my local repo and prune out all the commits with bad meta-data?
Update:
I edited the config file in the Sourceforge repo. I am still getting an error message, but I noticed a different line:
lib_lab_ref08@LBP-REF87XVMDP1 /e/devel/src/java/bbct (master)
$ git push -f
Password:
Counting objects: 464, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (148/148), done.
Writing objects: 100% (452/452), 470.65 KiB, done.
Total 452 (delta 268), reused 417 (delta 247)
fatal: Unable to create temporary file: Permission denied
error: unpack failed: index-pack abnormal exit
To ssh://codeguru@git.code.sf.net/p/bbct/code
! [remote rejected] master -> master (n/a (unpacker error))
error: failed to push some refs to 'ssh://codeguru@git.code.sf.net/p/bbct/code'
What does
fatal: Unable to create temporary file: Permission denied
error: unpack failed: index-pack abnormal exit
mean? More importantly what do I do to fix this?
After thought:
I am using a public computer. I recently compressed my repo database and I am guessing that I don't have permission to write to the temporary folder where git is unpacking the compressed repo objects during the push. I will try this on a computer without these security restrictions and see what happens.