当我签出远程git标签时使用这样的命令:
git checkout -b local_branch_name origin/remote_tag_name
Run Code Online (Sandbox Code Playgroud)
我得到这样的错误:
error: pathspec `origin/remote_tag_name` did not match any file(s) known to git.
Run Code Online (Sandbox Code Playgroud)
当我使用git tag命令时,我可以找到remote_tag_name.
在git中,我试图squash commit通过合并另一个分支然后HEAD通过以下方式重置到上一个位置:
git reset origin/master
Run Code Online (Sandbox Code Playgroud)
但我需要走出这一步.如何将HEAD移回上一个位置?
我有23b6772提交的SHA1 frag(),我需要将其移动到.
我怎样才能回到这个提交?
我需要一个用于在Stunnel的CApath目录中发布的文件的哈希名称.我在这个目录中有一些证书,他们运作良好.我还有一个服务器sert和服务器密钥:
cert = c:\Program Files (x86)\stunnel\server_cert.pem
key = c:\Program> Files (x86)\stunnel\private\server_key.pem
Run Code Online (Sandbox Code Playgroud)
当我尝试计算新证书的哈希时,我收到一个错误:
/ etc/pki/tls/misc/c_hash cert.pem
无法加载证书140603809879880:错误:0906D06C:PEM例程:PEM_read_bio:无起始行:pem_lib.c:703:期望:TRUSTED CERTIFICATE
据我所知,我必须签署我的证书,但我不明白我该怎么做.请提供解决方案.
PS:
消息
无法加载证书140603809879880:错误:0906D06C:PEM例程:PEM_read_bio:无起始行:pem_lib.c:703:期望:TRUSTED CERTIFICATE:
当我为cert.pem制作c_hash时发布这不是server_cert.pem,这是Root_CA,它的内容类似于
----- BEGIN CERTIFICATE -----
... 6UXBNSDVg5rSx60 = ..
-----结束证书-----
当我写作
openssl x509 -noout -text -in cert.pem
在控制台面板中,我看到这个信息:
/etc/pki/tls/misc/c_hash cert.pem
unable to load certificate 140603809879880:error:0906D06C:PEM
routines:PEM_read_bio:no start line:pem_lib.c:703:Expecting: TRUSTED CERTIFICATE
Run Code Online (Sandbox Code Playgroud) 我有一个我即将提交的Webstorm项目,但在按下Git Windows GUI中的提交按钮之前,我记得我不想提交我的.idea文件夹内容.
所以我使用了.gitignores为某些IDE 自动生成的网站并将其添加到我的.gitignore文件中.
.idea尽管我删除并重新添加了有问题的文件,但显式忽略的所有文件仍然显示为提交.
我还提交了没有任何其他文件的gitignore文件,并重新粘贴了我的内容,但它仍然没有忽略.idea文件.
如何告诉Git刷新或清除其缓存?
我尝试/进入有问题的目录,然后输入
git clean -n
但没有文件出现.
$ git pull origin master
fatal: unable to access 'https://xxxxxxxxxxxxxxx':
error setting certificate verify locations:
CAfile: C:/Users/abc/AppData/Local/Programs/Git/usr/bin/curl-ca-bundle.crt
CApath: none
Run Code Online (Sandbox Code Playgroud)
当我拉或推我的代码时,我收到此错误.
请指导我解决这个问题.
当我尝试使用Git克隆创建存储库时,我收到此消息.
git did not exit cleanly (exit code 1)
Run Code Online (Sandbox Code Playgroud)
如何解决这个问题?
我一直在使用git-format-patch和git-am将更改从一个存储库应用到另一个存储库.文件结构是相同的,但我应用的存储库中有一些更改,这会导致大多数补丁失败.但是,大多数补丁并不适用于线号中的一点点模糊性.
至于我能说出git-am apply一个非常严格的解释,所以完全拒绝所有这些补丁.
所以我的工作流程已成为
$ git am ../the-patch.patch
# Fails because the patch doesn't apply cleanly
$ patch -p1 < ../the-patch.patch
# Applies most of the hunks, leaves .rej files for the ones that conflict
# Fix the conflicting hunks manually
$ git am --continue
Run Code Online (Sandbox Code Playgroud)
如果我不必运行命令行补丁并且可以将其作为am命令的一部分发生,那将是很好的.
使用该--reject标志运行似乎会创建一个.rej文件,其中包含文件中的所有文件,如果有任何冲突,这不是我想要的.
使用--3way标志运行失败
fatal: sha1 information is lacking or useless (the-file.java).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Run Code Online (Sandbox Code Playgroud)
我认为是因为这个基于的变更集不在我正在合并的存储库中.
有没有办法 …
我在Mac OS X上使用git 2.5.4.
我有文件名包含é和git显示它与转义.有没有办法让它使用unicode并显示角色?终端显然可以处理它.
> ls
Sél
> git status
Untracked files:
(use "git add <file>..." to include in what will be committed)
...
"S\303\251l"
Run Code Online (Sandbox Code Playgroud)
我希望该文件显示为Sél,而不是S\303\251l.
假设bash配置了以下别名:
alias up="git --git-dir /path/to/backup/.git"
而那个特定的存储库 - 只有该存储库 - 具有以下git别名:
[alias]
backup = commit --allow-empty-message
Run Code Online (Sandbox Code Playgroud)
怎么能up自动完成backup?
这自动完成backup但不是up:
cd /a/different/dir
git --git-dir=/path/to/backup/.git ba
Run Code Online (Sandbox Code Playgroud)
这是up使用标准git命令自动完成但不是backup:
complete -o bashdefault -o default -o nospace -F __git_wrap__git_main up
编辑:Etan是对的,完成功能需要查看扩展的别名,所以我创建了以下内容:
CompletableAlias() {
if (($#<2)); then
return 1
fi
source_c="$1"
target_c="$2"
target_a=( "${@:2}" )
target_s="${target_a[*]}"
alias "${source_c}=${target_s}"
completion_modifier="__${source_c}_completion"
completion_original="$( complete -p "$target_c" 2>/dev/null |
sed 's/.*-F\W\+\(\w\+\).*/\1/'
)"
if [[ -n "$completion_original" ]]; then
read …Run Code Online (Sandbox Code Playgroud) 如何删除永不使用的文件并将存储释放回github lfs配额?
删除git历史中文件的参考点是否适用于这种情况?
git ×9
git-checkout ×2
bash ×1
certificate ×1
format-patch ×1
git-lfs ×1
git-reflog ×1
git-reset ×1
git-revert ×1
git-tag ×1
github ×1
openssl ×1
tortoisegit ×1
trusted ×1
unicode ×1
windows ×1