小编Tin*_*per的帖子

如何修复损坏的git存储库?

我把我的repo克隆到了我的ubuntu一个文件夹到新机器上,我得到了这个:

christopher@christopher-laptop:~/source/personal$ git clone ~/Ubuntu\ One\ Side\ Work/projects.git/
Cloning into 'projects'...
done.
fatal: unable to read tree 29a422c19251aeaeb907175e9b3219a9bed6c616
christopher@christopher-laptop:~/source/personal$ 
Run Code Online (Sandbox Code Playgroud)

所以我试着看看这里提出的许多其他问题,大多数人说要跑git fsck --full,然后当我尝试时我得到这个.

christopher@christopher-laptop:~/Ubuntu One Side Work/projects.git$ git fsck --full
Checking object directories: 100% (256/256), done.
Checking objects: 100% (447/447), done.
broken link from  commit 235ae1f48701d577d71ebd430344a159e5ba4881
              to  commit 984c11abfc9c2839b386f29c574d9e03383fa589
broken link from    tree 632a9cf0ef9fccea08438b574e2f1c954f4ff08b
              to    blob 25a742dff0a403b2b3884f2ffddf63eb45721fac
broken link from    tree 632a9cf0ef9fccea08438b574e2f1c954f4ff08b
              to    blob dd4e97e22e159a585b20e21028f964827d5afa4e
broken link from    tree 632a9cf0ef9fccea08438b574e2f1c954f4ff08b
              to    tree 29a422c19251aeaeb907175e9b3219a9bed6c616
broken link from    tree 632a9cf0ef9fccea08438b574e2f1c954f4ff08b
              to …
Run Code Online (Sandbox Code Playgroud)

git

84
推荐指数
7
解决办法
13万
查看次数

git p4提交失败

我尝试在一个repo上运行git p4 submit,我一直在运行它作为git和perforce之间的临时桥梁.多人使用repo作为遥控器,并定期将其提交回perforce.

除了一些重复的perforce提交之外,它一直很好地工作,其奇怪的行为我似乎无法再现.然后有一天,我得到了这个错误.我不能再将任何git提交到perforce.

user@hostname:~/Source/code$ git p4 submit -M --export-labels
Perforce checkout for depot path //depot/perforce/workspace/ located at /home/user/Source/git-p4-area/perforce/workspace/
Synchronizing p4 checkout...
... - file(s) up-to-date.
Applying ffa390f comments in config xml files
//depot/perforce/workspace/sub/folder/structure/first.xml#3 - opened for edit
//depot/perforce/workspace/sub/folder/structure/second.xml#3 - opened for edit
//depot/perforce/workspace/sub/folder/structure/third.xml#3 - opened for edit
//depot/perforce/workspace/sub/folder/structure/forth.xml#3 - opened for edit
//depot/perforce/workspace/sub/folder/structure/fifth.xml#1 - opened for edit
error: patch failed: sub/folder/structure/first.xml:1
error: sub/folder/structure/first.xml: patch does not apply
error: patch failed: sub/folder/structure/second.xml:1
error: sub/folder/structure/second.xml: patch does not apply
error: patch …
Run Code Online (Sandbox Code Playgroud)

git perforce git-p4

6
推荐指数
1
解决办法
2640
查看次数

如何在 Mac OS X 上安装 ruby​​-filemagic?

我发现了一些提出这个问题的现有问题,但其中没有一个答案有效。

尝试使用 brew 而不是端口在雪豹上安装 ruby​​-filemagic

在新的 RHEL6 服务器上安装 ruby​​-filemagic gem 时遇到困难

他们都指向这个页面作为答案

https://gist.github.com/eparreno/1845561

除了这也不起作用。我仍然收到以下错误。

Building native extensions with: '--with-magic-include=/usr/local/include --with-magic-lib=/usr/local/lib/'
This could take a while...
ERROR:  Error installing ruby-filemagic:
    ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb --with-magic-include=/usr/local/include --with-magic-lib=/usr/local/lib/
checking for main() in -lgnurx... no
checking for magic_open() in -lmagic... no
*** ERROR: missing required library to compile this module
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. …
Run Code Online (Sandbox Code Playgroud)

c++ ruby macos ruby-on-rails

1
推荐指数
1
解决办法
1119
查看次数

标签 统计

git ×2

c++ ×1

git-p4 ×1

macos ×1

perforce ×1

ruby ×1

ruby-on-rails ×1