我有两个回购:市场和Android.当我将Android合并到Market时,请使用以下步骤:
cd market
git remote add android ../android
git fetch android
git merge --allow-unrelated-histories android/master
Run Code Online (Sandbox Code Playgroud)
但我得到这个错误:
ei @ localhost:〜/ market $ git merge --allow-unrelated-histories android/master error:unknown option`allow-unrelated-histories'
我的环境:Ubuntu LTS 14.04
ei@localhost:~/market$ git --version
git version 1.9.1
Run Code Online (Sandbox Code Playgroud)
这个选项是从Git合并中删除的,还是需要一些额外的配置?
任何帮助将不胜感激,谢谢!
我最近一直在寻找有关如何在CentOS 7中安全保存git凭证的解决方案。
我想保存多个git存储库的凭据。
我想出的解决方案是对任何版本的git 使用gnome-keyring。但是我遇到了一些问题。我发现很多帖子说这不是Redhat 7或Centos 7的好解决方案。并且它将被弃用。
git config --global credential.helper /usr/share/doc/git/contrib/credential/gnome-keyring/git-credential-gnome-keyrin
Run Code Online (Sandbox Code Playgroud)
但这对我不起作用,使用git时出错:
与gnome-keyring-daemon通信时出错
然后我升级了git的最新版本2.11+以使用libsecret,这似乎更易于使用。
我做过同样的事情。
git config --global credential.helper /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
Run Code Online (Sandbox Code Playgroud)
这似乎按预期工作。我的问题是,这是安全保存git凭据的好方法吗?您是否知道将CentOS凭证保存在CentOS计算机上的其他解决方案?
我在 LFS 模式下使用标准 github.com 存储库,并且工作正常...但总是,当我推送时,会发生此 3xLogin:
git push
Username for 'https://github.com': xpto
Password for 'https://xpto@github.com':
Username for 'https://github.com': xpto
Password for 'https://xpto@github.com':
Locking support detected on remote "origin". Consider enabling it with:
$ git config 'lfs.https://github.com/xpto-org/xpto-prj.git/info/lfs.locksverify' true
Username for 'https://github.com': xpto
Password for 'https://xpto@github.com':
Git LFS: (0 of 1 files) 3.38 MB / 925.18 MB
Run Code Online (Sandbox Code Playgroud) git repo 没有启用 LFS,但我准备在另一个克隆中使用 git,因此使用git config --global credential.helper似乎是问题的原因。
这里似乎有同样的问题,但我使用的是更新版git(v2.17.0),所以这不是版本问题。
示例:简单之后的git pull消息是
/usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret get: 1:
/usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret get:
/usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret:
not found
Run Code Online (Sandbox Code Playgroud)
笔记
没有git-credential-libsecret文件,
sudo ls /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
ls: cannot access '/usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret': No such file or directory
Run Code Online (Sandbox Code Playgroud)