推送到 Github 时,我遇到以下错误
Counting objects: 16780, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (10936/10936), done.
remote: error: object f4ac3e31afb08298c6cd2ac04c6853940bbab3f6:contains '.git'
remote: fatal: Error in object
error: pack-objects died of signal 13
error: failed to push some refs to 'git@github.com:omarshammas/repo_name.git'
Run Code Online (Sandbox Code Playgroud)
这个 git 对象f4ac3e31afb08298c6cd2ac04c6853940bbab3f6
抱怨它包含.git
文件夹。我想这是从 mercurial 迁移到 git 时引起的。
无论如何,我尝试.git
使用从历史记录中删除文件夹
git filter-branch --force --index-filter \
'git rm -r --cached --ignore-unmatch .git' \
--prune-empty --tag-name-filter cat -- --all
Run Code Online (Sandbox Code Playgroud)
但我仍然遇到错误。
我没有遇到推送到其他遥控器(例如(bitbucket / heroku))的问题。Github 显然有更严格的验证。
不确定它是否重要,但抱怨的对象是树对象。 …
Emberjs v1.0.0-pre.4
把手1.0.0.rc.2
我正在ember中建立一个facebook好友列表管理器.当我导航到list/1/members
MembersRoute填充MembersController时没有出现的数据.
MembersRoute将呈现朋友模板,该模板通常显示我们所有的朋友,但在此方案中仅显示所选列表的成员.
应用程序的路由器
App.Router.map(function () {
this.route('instructions');
this.route('friends');
this.route('members', {path: '/list/:list_id/members'});
});
Run Code Online (Sandbox Code Playgroud)
路线
App.MembersRoute = Ember.Route.extend({
model: function () {
var list = this.controllerFor('application').get('selectedList'),
friends = list && list.get('members') || [];
return friends;
},
setupController: function (controller, model) {
var list = this.controllerFor('application').get('selectedList');
controller.set('title', list.get('title'));
controller.set('list', list);
controller.set('content', model);
},
renderTemplate: function () {
this.render('friends');
}
});
Run Code Online (Sandbox Code Playgroud)
朋友模板
<script type='text/x-handlebars' data-template-name='friends'>
<h2>{{title}}</h2>
<ul id='friends'>
{{#each friend in controller}}
<a href='#' {{action 'select' friend}}>
<li {{bindAttr …
Run Code Online (Sandbox Code Playgroud) 我正在构建一个与Google云端硬盘集成的网络应用,我想知道是否有办法列出,搜索或删除文件.
我从https://developers.google.com/drive/v1/reference/files#resource看到有4个操作.如果没有列表和搜索功能,则应用程序上有责任处理文件ID的管理.
我应该使用另一种API吗?这些功能是否在起作用?
我编写了一个程序来创建一个文件对象,如果没有指定父对象,默认情况下它会在根文件夹中创建。然后给定文件父级的 id,它检索根文件夹。
出于某种奇怪的原因,这不再有效,而不是返回根文件夹,我收到了 File Not Found 错误。有任何想法吗?
谢谢
更新
我尝试通过传入“root”作为 file_id 来检索文件,但遇到了同样的错误。
Get File By ID Error: File not found: 0AFrTA6Qc9-_TU9PVA
Run Code Online (Sandbox Code Playgroud)
下面是使用的函数
def get_file_by_id session, file_id
drive = session.discovered_api("drive", "v2")
result = session.execute api_method: drive.files.get, parameters: {'fileId' => file_id}
if result.status == 200
return result.data
else
raise "Get File By ID Error: #{result.data['error']['message']}"
end
end
Run Code Online (Sandbox Code Playgroud)
但是,除了根目录之外,我还可以通过 ID 获取其他文件。