我在 github 上建立了一个satis存储库,用于跨项目共享一些公司内部包。
现在,当我尝试“依赖”新存储库时,我尝试了以下操作:
"repositories": [ {
"type": "composer",
"url": "https://raw.githubusercontent.com/[organisation]/satis/master/web/packages.json?token=[token-copied-from-url]"
} ]
Run Code Online (Sandbox Code Playgroud)
它工作得足够好,composer 找到了 package.json,但是,它失败了:
[Composer\Downloader\TransportException]
The "https://raw.githubusercontent.com/[organization]/satis/master/web/packages.json?token=[token-copied-from-url]/include/all$[some-json-file].json" file could not be downloaded (HTTP/1.1 404 Not Found)
Run Code Online (Sandbox Code Playgroud)
这并不奇怪,因为 ?token 部分似乎生成了无效的 URL。
我可以通过手动将包含文件的内容直接移动到packages.json 中来解决这个问题,但这不太理想,特别是当 satis 决定生成多个文件时。
我认为这会导致的另一个问题是我不太了解令牌的有效性。也许它的寿命不长,然后需要定期重新生成。
有没有办法可以将我的 satis 存储库托管为“只是”github 存储库?
我有一个特定的命令,根据当前工作目录的内容做出不同的反应.我现在希望将此程序重新发送回自身,然后将调用发生在不同的目录中.
在"伪bash"中,我想要
command arg1 | cd /other dir | command arg2
Run Code Online (Sandbox Code Playgroud)
我个人使用bash,但如果它有助于使用不同的shell,我愿意接受建议.:)
我意识到有一个非常简单的解决方法,使用临时文件或命名管道,但我想知道是否有办法在一个命令中执行此操作.
这个问题似乎源于我缺乏git 1.5的经验,因为如果我尝试使用1.7的系统,这个工作正常.为什么我最终选择"没有分支",更重要的是,我能做些什么来获得"interesting_branch"的HEAD?
$ git --version
git version 1.5.6.5
git clone git@git.example.com:path/to/repo
Initialized empty Git repository in some/local/path/.git
<snip>
cd path
git branch -a
* master
origin/HEAD
origin/develop
origin/feature-cg-interesting_branch
$ git checkout feature-cg-interesting_branch
error: pathspec 'feature-cg-interesting_branch' did not match any file(s) known to git.
$ git checkout -- feature-cg-interesting_branch
error: pathspec 'feature-cg-interesting_branch' did not match any file(s) known to git.
$ git checkout origin/feature-cg-interesting_branch
Note: moving to "origin/feature-cg-interesting_branch" which isn't a local branch
If you want to create a new branch …Run Code Online (Sandbox Code Playgroud) 当facebook"赞"时,我想在元数据中附加YouTube视频.我应该将opengraph类型设置为什么?
我在http://ogp.me上找不到有用的答案,所以我去了这里.我得到的最接近的是如何通过youtube-video-link-through-facebook-graph-api,这是非常相关的,但更一般,并且从未提及类型.
也许在使用youtube视频时没有类型可以吗?
我在本地有两个存储库,A和B.我可以使用A的本地副本作为B中的远程吗?
就像是
git remote add A file:///path/to/repo/
Run Code Online (Sandbox Code Playgroud)