在git rebase origin/development以下错误消息从git显示:
fatal: refusing to merge unrelated histories
Error redoing merge 1234deadbeef1234deadbeef
Run Code Online (Sandbox Code Playgroud)
我的git版本是2.9.0.用于在以前的版本中正常工作.
如何通过新版本中引入的强制标记继续使用此rebase,从而允许不相关的历史记录?
我有一个有很多分支的项目.
我想同时在几个分支上工作而不用来回切换git checkout.
除了在其他地方复制整个存储库之外,我有什么方法可以做到这一点?
在对用户的git问题进行故障排除时,我不断遇到人们没有注意到来自git的错误/警告消息,然后烧掉他们的手指.有没有办法着色错误和警告git输出?
我很想知道你是否可以,如果将提交合并到我的孤儿分支中是否有任何问题.对于此特定实例,我的Salesforce存储库具有主分支和预发布分支,但由于我们的沙箱环境通常具有不属于生产的元数据,但我们希望对其进行版本控制,但与我们的干净预发布分支分开.
因此,我们有以下内容:
(Production Init Commit) (official release)
/ /
o-------------------------o [master]
\ /
o------o---------o----o [pre-release]
\ /
o-----O [feature]
\ <-- IS THIS ALLOWED/POSSIBLE/BAD IDEA?
\
o------------O [DEV] (orphan branch)
/
(Initial commit from our sandbox environment)
Run Code Online (Sandbox Code Playgroud) 刚刚遇到这个 Git 行为,它看起来像是凭证存储的错误:
$ git pull
Username for 'https://github.com': ...
Password for 'https://...@github.com': ...
Already up-to-date.
$ git config credential.helper store
$ git pull
remote: Repository not found.
然后,去编辑 .git/config 以删除[credential] helper = store和 git pull 再次工作。
什么可能导致它?
如何在不遇到此错误的情况下使用凭证助手?
更新在 Ubuntu 14.04 上使用 git 版本 1.9.1
更新使用 git 版本 2.9.3 重新测试,结果相同。
更新我在 github 上的 ~/.git-credentials 中有几个帐户。我用 GIT_CURL_VERBOSE=1 GIT_TRACE=1 运行 git,它看起来像是按照它们列出的顺序选择第一个 github 帐户。
但是,我正在使用的存储库中的 .git/config 具有正确的 user.email,它在 ~/.git-credentials 中有一个匹配的条目。它只是不使用该条目。
我通常使用 Windows Power shell 终端连接到我的网站的 Web 主机。
在尝试使用“”命令更新作曲家时composer self-update --2,我收到如下错误
Your github OAuth token for github.com contains invalid characters
Run Code Online (Sandbox Code Playgroud)
我已检查文件所在auth.json位置composer.json,但找不到它。
因此,我尝试使用命令提示符更新令牌,但没有任何效果。
我已附上错误图像,请检查,任何帮助将不胜感激。
我决定在gitlab上尝试git lfs.我注意到它不适用于ssh所以我决定使用https.Push工作正常,但当我尝试克隆我的项目时,它要求我输入每个文件的用户名和密码.
那有点烦人.它有什么解决方法吗?
这个问题持续存在,真正的解决方案在哪里?它有简单直接的配方吗?
链接https://git-scm.com/docs/gitcredentials和git-lfs/wiki/Tutorial可能有些东西,但没有客观解决方案.
我描述的情况git lfs env,
git-lfs/2.4.0 (GitHub; linux amd64; go 1.8.3)
git version 2.7.4
LocalWorkingDir=
LocalGitDir=
LocalGitStorageDir=
LocalMediaDir=lfs/objects
LocalReferenceDir=
TempDir=lfs/tmp
ConcurrentTransfers=3
TusTransfers=false
BasicTransfersOnly=false
SkipDownloadErrors=false
FetchRecentAlways=false
FetchRecentRefsDays=7
FetchRecentCommitsDays=0
FetchRecentRefsIncludeRemotes=true
PruneOffsetDays=3
PruneVerifyRemoteAlways=false
PruneRemoteName=origin
LfsStorageDir=lfs
AccessDownload=none
AccessUpload=none
DownloadTransfers=basic
UploadTransfers=basic
git config filter.lfs.process = "git-lfs filter-process"
git config filter.lfs.smudge = "git-lfs smudge -- %f"
git config filter.lfs.clean = "git-lfs clean -- %f"
Run Code Online (Sandbox Code Playgroud)
当我做git clone https://github.com/myPrivate/project1 问题克隆过程不完整(错误),并一直在 给用户和密码 ...
尝试做凭证时也出现问题(参见 …
我一定遗漏了一些明显的东西……但是 Git 别名根本不起作用。请帮帮我!
$ git config --global alias.v version
$ git config --global --list
alias.v=version
$ git config --global alias.v
version
$ git v
Expansion of alias 'v' failed; 'version' is not a git command
$ git version
git version 2.9.0
$ cat ~/.gitconfig
[alias]
v = version
Run Code Online (Sandbox Code Playgroud)
根据@torek 的建议,我用 测试了同样的东西log,但它也不起作用:
$ git config --global alias.l log
$ git config --global --list
alias.v=version
alias.l=log
$ git config --global alias.l
log
$ git l
Expansion of alias …Run Code Online (Sandbox Code Playgroud) 我在GitHub上创建了许多存储库,但尚未将它们中的任何一个上传到Git.
在GitHub上下载我的存储库时,使用repo文件列表右上角的绿色按钮,我注意到你可以使用链接通过Git下载repo,即使我还没有将回购上传到Git .我也注意到链接看起来像这样:https://github.com/Dog-Face-Development/Bars.git并且指向一个Bars.git(或任何repo的名称)文件,我在我的文件列表中没有.
问题是:由于我可以通过Git下载我的GitHub仓库,即使我没有将仓库上传到Git,并且由于似乎有一个带.git扩展名的文件,这是否意味着我的仓库自动上传并添加没有我做任何事情的Git,然后我可以使用我的电脑和命令行Git工具承诺使用Git的回购?
git ×8
github ×2
access-token ×1
branch ×1
git-lfs ×1
gitlab ×1
merge ×1
orphan ×1
rebase ×1
repository ×1