草庐IT

git - "Unable to determine upstream SVN information from working tree history"

我正在尝试使用GCCgit镜像,已记录here.前段时间,我克隆了git仓库:gitclonegit://gcc.gnu.org/git/gcc.git添加了git-svn内容:gitsvninit-Ttrunk--prefix=origin/svn+ssh://gcc.gnu.org/svn/gcc然后gitsvnrebase和gitsvndcommit等都运行良好。几个月后,我在本地git分支上完成了各种开发工作,并且开始向上游SVN提交更多更改:从git镜像更新:$gitrebase确保我拥有来自SVN的绝对最新版本,但它不起作用:$gitsvnrebase-vUnabletod

git push origin master :refs/heads/master what does this do

当我在我的gitolite存储库上创建一个新的存储库时,我总是必须输入以下命令才能开始将代码推送到服务器。gitpushoriginmaster:refs/heads/master它有什么作用?我的猜测是,这与不确定的头部引用有关。谁能给我解释一下? 最佳答案 这个命令分为三个部分:gitpush这会调用推送命令origin这会命名您要推送到的Remote。这是存储在.git/config中的命名Remote之一(您可以使用gitremote列出这些Remote)、URL或token.这意味着当前存储库。master:refs/he

Git pull - 错误 : The following untracked working tree files would be overwritten by merge:

当我在监控服务器上每60秒执行一次gitpull时,我不断收到此错误。我正在使用chef和python脚本每60秒“gitpull”一次。Updating70fe6e8..2da34fcerror:Thefollowinguntrackedworkingtreefileswouldbeoverwrittenbymerge:rtb_redis_connections/redis_connections.pycPleasemoveorremovethembeforeyoucanmerge.Aborting我该如何处理?这些pyc文件不断被创建。 最佳答案

git - 我如何 `git rebase -i` 并防止 "You asked to amend the most recent commit, but doing so would make it empty."?

我想运行一个gitrebase-isome-hash。当我运行它时,出现错误:Youaskedtoamendthemostrecentcommit,butdoingsowouldmakeitempty.Youcanrepeatyourcommandwith--allow-empty,oryoucanremovethecommitentirelywith"gitresetHEAD^".[...]Couldnotapply[...]该错误似乎特定于单个提交,因为--allow-empty不是我可以传递给rebase的选项。显然--keep-empty是我可以传递给gitrebase的选项,

git - 错误 : The following untracked working tree files would be overwritten by checkout

当我执行gitstatus时,它说nothingtocommit,workingdirectoryclean然后我执行gitpull--rebase,它说:First,rewindingheadtoreplayyourworkontopofit...error:Thefollowinguntrackedworkingtreefileswouldbeoverwrittenbycheckout:includes/resources/moduledata/12/_Fr4_02_Invention_IPA_SR_la-Fête.pdfPleasemoveorremovethembeforey

Git: "working directory"到底在哪里?

我正在阅读一些Git教程。“工作目录”的概念一直被提及,但是,我阅读的教程或文档都没有指出这个“工作目录”在哪里或什么。p>我认为它实际上是.git的父目录,也就是我在其中运行gitinit的目录。但是我正在观看的视频教程谈到了没有什么可提交和“工作目录干净”的状态:Infactyoucanactuallymakeacopyoftherepository,andmakethatcopysothatitdoesnothaveaworkingdirectory,thisisactuallycalledthebareclone.ThisisactuallywhatGitHubuses.如果我

ios - 在 git 版本控制下添加项目时在 Xcode 中出现 "Share working copy?"

我有一个使用git进行版本控制的项目。我从GitHub克隆了一个库来使用(也可能使用git)。我将下载的项目的.xcodeproj文件添加到我自己的项目中,并得到了这个对话框:Shareworkingcopy?Aworkingcopythathasnotbeensharedhasbeenaddedtothisworkspace.ChooseYestoaddthisworkingcopytotheWorkspaceSourceControlData.如果我选择"is"或“否”会怎样?这种情况我应该选择哪个? 最佳答案 我尝试通过两种方

git - 致命的 : ambiguous argument 'origin' : unknown revision or path not in the working tree

我过去经常使用gitdifforigin。在不同的环境中它不起作用。我不知道为什么。user@host>gitdifforiginfatal:ambiguousargument'origin':unknownrevisionorpathnotintheworkingtree.Use'--'toseparatepathsfromrevisions,likethis:'git[...]--[...]'状态:user@host>gitstatusOnbranchmasternothingtocommit,workingdirectorycleanRemote:user@host>gitrem

iphone - Xcode 和 Git 源代码管理 : “The working copy XXXXX failed to commit files”

我使用Xcode开发和发布应用程序已经将近一年了。我一直使用git作为本地存储库,使用bitbucket作为远程存储库。直到今天早上一切都很好。我现在收到一个错误'工作副本“xxx”未能提交文件。请告诉我你是谁。”Xcode然后建议我运行gitconfig并给它一个电子邮件地址和名称。我不知道为什么它突然需要知道我是谁。我不知道它以前以为我是谁,我不希望它变得比现在更困惑。我没有在Mac上使用命令提示符做任何事情,所以我不确定它希望我在哪里输入此信息。我依稀记得一年前看到过关于使用命令提示符设置bitbucket的建议,但它们看起来很困惑,所以我从xcodeGUI中完成了所有操作。这是

macos - Git 错误 "fatal: ambiguous argument ' HEAD' : unknown revision or path not in the working tree"

我正在尝试从Debian初始化一个新的Git存储库(实际上是VirtualBox上的VM,在MacOSX上安装并运行):cd~mkdirtestcdtestgitinitInitializedemptyGitrepositoryin/home/david/test/.git/fatal:ambiguousargument'HEAD':unknownrevisionorpathnotintheworkingtree.Use'--'toseparatepathsfromrevisions[david@server-VM-001:test(master#)$]有什么问题?