天道酬勤,学无止境

git-remote

Visual Studio 2013 中的 Git 远程操作导致错误“指定的登录会话不存在。 它可能已经被终止了”(Git remote operations inside Visual Studio 2013 result in the error “A specified logon session does not exist. It may already have been terminated”)

问题 我在 Visual Studio 2013 中使用 Git。当我尝试对远程(如 fetch、pull、push 等)执行任何操作时,出现以下错误: 发生错误。 详细消息:libgit2 引发错误。 类别 = 净值(错误)。 指定的登录会话不存在。 它可能已经被终止 我无法找到答案,但最终找到了两个解决方法。 我将在这里发布解决方法。 我下载了 Git,所以我可以在 Visual Studio 之外使用它。 如果我在命令行上运行 git remote 命令,它们工作得很好,所以问题不在于 git 或我的远程 git 存储库。 每当我通过 Visual Studio 执行远程 git 操作时,它都会使用标准的 Windows 对话框来捕获密码。 我注意到如果选中“记住我的凭据”框,我总是会收到错误消息。 如果我取消选中它,它会正常工作。 回答1 取消选中“记住我的凭据”复选框。 Visual Stdio 2015两次要求我输入凭据。 请取消选中上述复选框两次。 它对我有用 回答2 在 VS 2015 上也遇到了这个问题。 确保您的存储库位置在您的全局设置中是正确的(如果您正在切换凭据,这也可能适用于存储库设置)。 您的 Windows 凭据管理器可能具有过时的凭据。 请参阅此问题以解决该问题。

2021-09-18 11:53:18    分类:技术分享    git   visual-studio-2013   git-remote

Git 推入 master 失败...(Git pushing into master failed...)

问题 我不确定从哪里搜索,因为错误列表与底部一样长。 但总的来说,这就是我所做的。 我做了什么: git clone url . git add abc.txt git commit -m "testing" git push origin master / git push 错误: remote: error: refusing to update checked out branch: refs/heads/master remote: error: By default, updating the current branch in a non-bare repository remote: error: is denied, because it will make the index and work tree inconsistent remote: error: with what you pushed, and will require 'git reset --hard' to match remote: error: the work tree to HEAD. remote: error: remote: error: You can set 'receive.denyCurrentBranch' configuration variable to

2021-09-13 03:49:14    分类:技术分享    git   git-push   git-remote

Git 远程仓库中的项目文件在哪里?(where are project files in remote repo in Git?)

问题 我开始使用 Git 和我的项目 VCS。 我已经使用创建了一个远程仓库 git init --bare 在 /codes-repo 中并将更改从本地仓库推送到那里。 然后我想将项目文件从那里移动到 /var/www/project 以便 http://.... 访问。 但我在 /codes-repo 看不到任何项目文件(index.php,css/,....)来复制它们,那里只有 git 文件和文件夹。 他们在哪里?? 回答1 裸存储库没有检出。 也就是说,一个裸存储库只保存提交信息——它不会在存储库文件夹中保留磁盘上实际文件的副本。 裸仓库只能被推入或拉出。 要获取文件,最好的办法可能是克隆裸存储库(作为非裸克隆),并在克隆上运行检出。 另一种选择,如果你觉得勇敢,是将裸存储库转换为非裸存储库(如何将裸 git 存储库转换为普通存储库(就地)?) 回答2 要从裸存储库复制文件,您可以使用 git archive GIT_DIR=~/BARE_REPO git archive --format tar master | tar xvf - git archive 命令会将目标提交(例如 marter)转换为 tar 格式,并发送到标准输出。 您可以将其通过管道传输到 tar 命令以立即提取。 另一种方法是检出存储库。 git checkout ~/BARE_REPO

2021-09-11 16:35:46    分类:技术分享    git   git-remote   git-bare

git branch unkown but checkout works

on my remote repository a new branch has been created. In GitBash in my Working Directory (on master branch) I type git remote update and git pull. To my understanding git remote update will update all branches set to track remote ones as explained here: What is the difference between 'git remote update', 'git fetch' and 'git pull'? So when I type git diff master newBranch --name-only I expected to see a list of files which are different in both branches. But instead I got the following error message: fatal: ambiguous argument 'newBranch': unknown revision or path not in the working tree. But

2021-09-09 04:59:52    分类:问答    git   version-control   git-remote

where are project files in remote repo in Git?

I start to use Git and my project VCS. I have created a remote repo using git init --bare in /codes-repo and push changes from local repo to there. then I want to move project files from there to /var/www/project to be accessible for http://.... . but I don't see any project files (index.php,css/,....) at /codes-repo to copy them, there are only git files and folders there. Where are them??

2021-09-08 16:55:54    分类:问答    git   git-remote   git-bare

Git pushing into master failed...

I am not sure where to search from as the error list is as long as the bottom. But generally this is what I did. What I did: git clone url . git add abc.txt git commit -m "testing" git push origin master / git push Error: remote: error: refusing to update checked out branch: refs/heads/master remote: error: By default, updating the current branch in a non-bare repository remote: error: is denied, because it will make the index and work tree inconsistent remote: error: with what you pushed, and will require 'git reset --hard' to match remote: error: the work tree to HEAD. remote: error: remote

2021-09-07 15:59:10    分类:问答    git   git-push   git-remote

New git repository error on first push

I did git init, then I realized I should include the link that I got when I made the repository in GitHub so I did this: git init https://github.com/genadinik/AndroidMakeMoneyFree.git Then I did: git add -all git commit -m "Adding repository contents" And that worked fine, but then I tried to push and got this error: git push origin master fatal: 'origin' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

2021-09-04 06:33:49    分类:问答    git   github   git-remote

How does git deal with identical branch names from two different remote repo?

If I set up two remote using git remote add for a repo, and the two repo contain a branch with the same name. How does git know which branch of which repo I intend to use when I switch to it using git checkout?

2021-08-31 05:01:30    分类:问答    git   git-remote   git-checkout

如何从git中的特定遥控器请求拉取请求?(how to request pull request from a particular remote in git?)

问题 这是我的 git 配置文件的外观: [core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = false [remote "origin"] url = git@github.com:XXXXXXX/training.test.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] remote = origin merge = refs/heads/master [remote "upstream"] url = https://github.com/YYYYYYY/training.test.git fetch = +refs/heads/*:refs/remotes/upstream/* remote “源”指向我的 github 帐户remote “上游”指向与我分叉的不同 github 帐户。 Q1:所以每次我做一个git pull ,它会pull从我的remote (即“原点”)。 我将如何对remote upstream进行git pull 。 Q2:我commit and

2021-08-14 02:57:12    分类:技术分享    git   github   git-push   git-pull   git-remote

Google App Engine 部署失败,“空索引配置”(Google App Engine Deployment Failed, “empty index configuration”)

问题 我一直在尝试将我的本地副本推送到远程存储库。 但是,我的控制台上显示以下错误: Total 0 (delta 0), reused 0 (delta 0) remote: Deploying... remote: Created deployment: uconnect-dev-server.clouddev.gaeTemplate-d981b975f1ecaa6d.deployment_1382264909584 remote: Created deployment: uconnect-dev-server.clouddev.gaeTemplate-d981b975f1ecaa6d.deployment_1382264909584 remote: Created deployment: uconnect-dev-server.clouddev.gaeTemplate-d981b975f1ecaa6d.deployment_1382264909584 remote: Deployment failed: Deployment failed, details: { Failed to load application, Empty index configuration., none} To https://code.google.com/id/-i5ivOq1gug/

2021-08-12 05:41:24    分类:技术分享    git   google-app-engine   git-push   git-remote