rewriting the commit tree to rename the author and change the email後,我的本地回購和遠程原點不同步。我是唯一的開發人員,並且希望將我的本地倉庫推到原點,將origin/master更新到我的本地主分支。以下是我已經沒有任何成功的嘗試:移動遠程分支
[email protected] /e/devel/src/java/bbct (swing.0.5.2)
$ git push
Password:
To ssh://[email protected]/p/bbct/code
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'ssh://[email protected]/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.
[email protected] /e/devel/src/java/bbct (swing.0.5.2)
$ git push origin master:master
Password:
To ssh://[email protected]/p/bbct/code
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'ssh://[email protected]/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.
[email protected] /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://[email protected]/p/bbct/code
! [remote rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'ssh://[email protected]/p/bbct/code'
[email protected] /e/devel/src/java/bbct (swing.0.5.2)
$
我還拉出身的建議,但是,做了合併與所有提交,其中有一些錯誤的作者姓名和電子郵件。我如何將我的遠程原點回購與我的本地回購同步並刪除所有提交的不良元數據?
更新:
我編輯在Sourceforge的回購的配置文件。我仍然得到錯誤信息,但我注意到一個不同的線路:
[email protected] /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://[email protected]it.code.sf.net/p/bbct/code
! [remote rejected] master -> master (n/a (unpacker error))
error: failed to push some refs to 'ssh://[email protected]/p/bbct/code'
是什麼
fatal: Unable to create temporary file: Permission denied
error: unpack failed: index-pack abnormal exit
是什麼意思?更重要的是,我該如何解決這個問題?
左思右想:
我使用的公共電腦。我最近壓縮了我的repo數據庫,並且我猜測我沒有權限寫入臨時文件夾,git在推送過程中解壓縮壓縮的repo對象。我會在沒有這些安全限制的計算機上試試這個,看看會發生什麼。
它看起來像遠程拒絕非ff通過鉤子推,所以沒有什麼可以做 – CharlesB
此外,錯誤消息中的是鉤子拒絕我的推動線索? –
是錯的,它不是一個鉤子,而是一個回購設置,所以沒關係,看到我的回答 – CharlesB