2

When I am trying to push my existing repository from github to bitbucket, I get this:-

 # 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://[email protected]/techvineet/task-manager.git ! [remote rejected] master -> master (missing necessary objects) error: failed to push some refs to 'ssh://[email protected]/techvineet/test-site.git' 

What I m doing wrong?

3
  • While using GIT the first thing you should do is to check your local repository status, try to do git status and let us know whats happening there! Commented Jul 28, 2013 at 6:43
  • Seems to be a similar problem as this post: stackoverflow.com/questions/13301748/… Commented Jul 28, 2013 at 6:44
  • @Rishi # On branch master # Untracked files: # (use "git add <file>..." to include in what will be committed) # # .project nothing added to commit but untracked files present (use "git add" to track) Commented Jul 28, 2013 at 6:46

1 Answer 1

1

You can do the following things:

  • Go to your local GIT repository similar to this C:\xampp\htdocs\<project>\.git where .git is a hidden folder.
  • Open the config file available there, it must contains the code similar to this
 [core] repositoryformatversion = 0 filemode = false bare = false logallrefupdates = true symlinks = false ignorecase = true hideDotFiles = dotGitOnly`` [remote "origin"] url = ssh://[email protected]/techvineet/test-site.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] remote = origin merge = refs/heads/master 
  • Replace the ssh://[email protected]/techvineet/test-site.git with https://<your_username>@bitbucket.org/techvineet/test-site.git
  • Here you can also permanently save your password, which can save your time while using GIT by appending your password after a colon, https://techvineet:[email protected]/techvineet/test-site.git where techvineet should be your username and techvineet123 should be the password for the same.
  • Save the file and close your current GIT session.
  • Open a new session and check one again git status if any untracked files are remaining to add use git add * to add then use git commit -a -m 'Your Message' to commit your files, remember never push before pulling the stuffs. There you can use git pull and then use git push
  • This should be done. Please check and let me know.

Cheers!

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.