关于将Github代码推送到Bitbucket的问题
当我试图将我现有的存储库从github推送到bitbucket时,我得到这个: -
# git push Counting objects: 1025, done. Delta compression using up to 2 threads. Compressing objects: 100% (661/661), done. Writing objects: 100% (1025/1025), 2.02 MiB, done. Total 1025 (delta 302), reused 909 (delta 227) error: Could not read d97e763d22304ebfa5a1fb7ba9468cb36d4eff49 fatal: Failed to traverse parents of commit 57211de122c9b449c2b4bb0d37ac6a73545a9c68 error: Could not read d97e763d22304ebfa5a1fb7ba9468cb36d4eff49 fatal: Failed to traverse parents of commit 57211de122c9b449c2b4bb0d37ac6a73545a9c68 To ssh://git@bitbucket.org/techvineet/task-manager.git ! [remote rejected] master -> master (missing necessary objects) error: failed to push some refs to 'ssh://git@bitbucket.org/techvineet/test-site.git'
我做错了什么?
你可以做以下事情:
C:xampphtdocs<project>.git .git其中.git是一个隐藏文件夹。 config文件,它必须包含类似于此的代码
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
hideDotFiles = dotGitOnly``
[remote "origin"]
url = ssh://git@bitbucket.org/techvineet/test-site.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
https://<your_username>@bitbucket.org/techvineet/test-site.git替换ssh://git@bitbucket.org/techvineet/test-site.git https://<your_username>@bitbucket.org/techvineet/test-site.git https://techvineet:techvineet123@bitbucket.org/techvineet/test-site.git techvineet应该是您的用户名和techvineet123应该是相同的密码。 git status如果任何未跟踪的文件剩下要添加使用git add *添加然后使用git commit -a -m 'Your Message'提交您的文件,切记在拉东西之前不要推送。 你可以使用git pull然后使用git push 干杯!
链接地址: http://www.djcxy.com/p/23175.html上一篇: Issue on pushing Github code to Bitbucket
下一篇: Is there a way to skip password typing when using https:// on GitHub?
