git/refs/heads/masterĬhecking object directories: 100% (256/256), done.Įrror: object file. ![]() I was able to recover my repository from: zsh(broken)% git log masterĮrror: object file. Then I went in to git config -e and set up my master branch and was back up and running with nothing lost! The last thing I did was: ! cd ~/Dev/repo_copy I simply would check it out and then do git push -force local_remote HEAD. So for any local branch I had whose git log didn't end in. So I started instead with an empty repository, and then pushing branches to it worked OK. repo_copy and then using that as a local remote resulted in the following error: ! git push -force local_remote HEADįatal: failed to read object e0a9dffddeeca96dbaa275636f8e8f5d4866e0ed: Invalid argumentĮrror: failed to push some refs to '/Users/steve/Dev/repo_copy' Unfortunately, cloning the repository into. Why isn't this possible?Īt any rate I stumbled across this cool strategy to push a branch to another local Git repository. Theoretically, since this is a local repository, I feel that Git should be able to recover/repair itself using origin. I don't care too much about repairing my repository, except I have a few local branches that were too experimental to bother pushing to the remote repository, and I'd like to salvage the work in those branches. So the corrupted commit was deep in the history. Receiving objects: 100% (1857/1857), 374.35 KiB | 268.00 KiB/s, done.For me, I had enabled TRIM in OS X with a non-Apple SSD (which is not recommended) and apparently caused various corruptions on my boot disk. Remote: Total 1857 (delta 0), reused 0 (delta 0) Remote: Reusing existing pack: 1857, done. If you’ve cloned your repository, you should at least see origin – that is the default name Git gives to the server you cloned from: $ git clone It lists the shortnames of each remote handle you’ve specified. To see which remote servers you have configured, you can run the git remote command. ![]() In this section, we’ll cover some of these remote-management skills. Managing remote repositories includes knowing how to add remote repositories, remove remotes that are no longer valid, manage various remote branches and define them as being tracked or not, and more. Collaborating with others involves managing these remote repositories and pushing and pulling data to and from them when you need to share work. You can have several of them, each of which generally is either read-only or read/write for you. Remote repositories are versions of your project that are hosted on the Internet or network somewhere. To be able to collaborate on any Git project, you need to know how to manage your remote repositories.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |