Error Refs/remotes/m/master Points Nowhere
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this fatal: bad object master site About Us Learn more about Stack Overflow the company Business Learn more
Error: Refs/stash Does Not Point To A Valid Object!
about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss error: head: invalid sha1 pointer Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Git refs/remotes/origin/master does git does not point to a commit not point to a valid object up vote 13 down vote favorite 9 After the last merge to the master branch of my Git repository I have lost the ability to clone repository. Cloning into test-repository... remote: Counting objects: 126084, done. remote: Compressing objects: 100% (28327/28327), done. Receiving objects: 100% (126084/126084), 132.63 MiB | 29.30 MiB/s, done. remote: Total 126084 (delta 96101), reused 126078
No Valid Git Object Identified By 'refs/remotes/origin/master' Exists In The Repository
(delta 96095) Resolving deltas: 100% (96101/96101), done. error: refs/remotes/origin/master does not point to a valid object! error: Trying to write ref refs/heads/master with nonexistant object 951aca8051823b2f202d30c9cb05401ef17618c6 Fisheye, a repository hosting tool, is reporting: Unable to fetch from remote repository: /var/atlassian/application-data/fisheye/managed-repos/MYREPONAME.git error: unable to find 0d998c99b6d01e8aabca72b1934802acf90b8fc9, fatal: object 0d998c99b6d01e8aabca72b1934802acf90b8fc9 not found The last commit in the repository on master branch is: commit 0d998c99b6d01e8aabca72b1934802acf90b8fc9 Merge: a6ea4b3 1f373a9 Date: Fri Dec 14 13:57:24 2012 +0200 Merge branch 'new_error_code' I have tried: cd /var/atlassian/application-data/fisheye/managed-repos/MYREPONAME.git git gc git fsck --full git reflog expire --expire=0 --all git update-ref git gc --aggressive The following questions did not help my case: How to recover Git objects damaged by hard disk failure? Fatal error after GitHub automatic merge Listing and deleting Git commits that are under no branch (dangling?) git share|improve this question edited Jul 11 '14 at 3:10 random 6,87974262 asked Dec 14 '12 at 15:28 Matt Harasymczuk 73211127 add a comment| 2 Answers 2 active oldest votes up vote 28 down vote accepted git gc git fsck --full git reflog expire --expire=0 --all git update-ref -d 0d998c99b6d01e8aabca72b1934802acf90b8fc9 git gc --aggressive git remote update --prune and it worked! share|improve thi
från GoogleLogga inDolda fältSök efter grupper eller meddelanden
how it can be done. Show current remote (this is optional step of course): 1 2 3 4 5 6 http://www.radomirml.com/blog/2009/04/13/relocate-remote-git-repository-for-local-clone/ 7 $ git remote show origin * remote origin URL: git@oldserver:project.git Remote branch(es) merged with 'git pull' while on branch master master Tracked remote branches https://news.ycombinator.com/item?id=6713742 class='line'>master What we need to do is to remove current origin and add the new one: 1 2 3 4 5 6 7 8 9 10 $ git remote rm does not origin $ git remote add origin git@newserver:project.git $ git remote show origin * remote origin URL: git@newserver:project.git Remote branch(es) merged with 'git pull' while on branch master master error: refs/remotes/origin/HEAD points nowhere! New remote branches (next fetch will store in remotes/origin) master Don't worry about the error shown by the last command. The does not point first pull from the origin will fix it: 1 2 3 4 5 6 7 8 9 10 11 $ git pull From git@newserver:project.git * [new branch] master -> origin/master Already up-to-date. $ git remote show origin * remote origin URL: git@newserver:project.git Remote branch(es) merged with 'git pull' while on branch master master Tracked remote branches master I'm still fresh with Git so maybe thre's a better way to do it but this worked for me. Posted by Radomir Mladenovic Apr 13th, 2009 Tweet « New candy form Google: Java support in App Engine Krusader's handling of archives » Comments Please enable JavaScript to view the comments powered by Disqus. Lets Talk I work on all kinds of projects, from small & large web applications, to maintaining existing web apps. If you have an idea for a project, I'd love to talk to you about it. Email me: About Me Radomir Mladenovic Java/C#/Web Developer based in Nis, Serbia Recent Posts Moving blog from WordPress to Octopress Interesting project: javascript fulltext search engine library
favorite tjdetwiler 1067 days ago Githubs response:Good news from GitHub: they have extracted the full list of SHA-1 before the forced push ! Many thanks to Nathan Witmer :-)See below the full CSV with the SHA-1. He created as well a branch named 'recovery' that points to the candidate point for restoring the master branch.Hope this will help to sort out the remaining repos.Luca. > Hi Luca. > > Oh man, that sinking feeling! > > But, no worries: I've gone through each of the repos listed above and done the following : > > * retrieved the SHA for the previous `master` before you force-pushed > * created a branch called `recovery` pointing to each former master > > In some cases, these are the same. > > I can go further and reset the master refs to their former shas if you'd like, or you can recover these yourself. To do so, in each repo: > > $ git fetch > $ git checkout master > $ git reset --hard origin/recovery > $ git push --force origin master > > I've attached a csv containing the shas (former master and forced master) for each branch, for your reference. > > Good luck! > > Nathan. lightyrs 1067 days ago GitHub represents a new ideal in customer service. I hope other companies will begin to follow their example. gcb0 1067 days ago why couldn't they do those steps themselves? ...i'm not really familiar with github's git.I am having a really hard time understanding why a distributed VCS with hundreds of users needs the admin to the central repo to do anything for them. cjh_ 1067 days ago The central repository is the only point that knows (with 100% certainty) which ref the branch was set to before the force push.Each distributed node only knows the ref the branch was pointing at the last time they fetched, so their certainty on what the branch looked like before the force push is much lower. deathanatos 1067 days ago > The central repository is the only point that knows (with 100% certainty) which ref the branc