草庐IT

git - 如何解决git merge 错误 "Swap file .MERGE_MSG.swp already exists"

当我pull时:E325:ATTENTIONFoundaswapfilebythename"~/Documents/Sites/recipegenerator/.git/.MERGE_MSG.swp"ownedby:usernamedated:WedDec1412:28:452016filename:~username/Documents/Sites/recipegenerator/.git/MERGE_MSGmodified:YESusername:usernamehostname:Users-MacBook-Pro.localprocessID:33747Whileopeningf

Git 错误 : "Please make sure you have the correct access rights and the repository exists"

我在Windows上使用TortoiseGit。当我尝试从标准Windows资源管理器的上下文菜单中克隆时,出现此错误:Pleasemakesureyouhavethecorrectaccessrightsandtherepositoryexists更准确地说,终端的快照如下:git.execlone--progress-v"git@arobotdev:\git\AlfaRobot.git""C:\Work\AlfaRobot"Cloninginto'C:\Work\AlfaRobot'...Permissiondenied,pleasetryagain.Permissiondenie

git - 尝试 push SourceTree 时出现 "Updates were rejected because the tag already exists"

尝试通过源代码树推送时,出现以下错误:git-cdiff.mnemonicprefix=false-ccore.quotepath=false-ccredential.helper=sourcetreepush-v--tagsoriginrefs/heads/master:refs/heads/masterPushingtohttps://user@github.com/repo.gitTohttps://user@github.com/repo.git=[uptodate]master->master...![rejected]example_tag->example_tag(alr

git - 重新创建git标签后出现“tag already exists in the remote"错误

运行以下步骤后,出现以下错误:Togit@provider.com:username/repo-name.git![rejected]dev->dev(alreadyexists)error:failedtopushsomerefsto'git@provider.com:username/repo-name.git'hint:Updateswererejectedbecausethetagalreadyexistsintheremote.创建存储库在本地机器上克隆了repo。修改自述文件,提交更改并推送提交。创建标签dev:gittagdev推送标签:gitpush--tags修改自述

git - 将公共(public)代码添加为 git 子模块 : "already exists in the index" 的问题

我是git的新手,希望能帮助我添加子模块。我收到了两个共享一些通用代码的项目。共享代码只是复制到两个项目中。我为公共(public)代码创建了一个单独的git存储库,并将其从项目中删除,并计划将其添加为git子模块。我使用了gitsubmoduleadd的path选项来指定文件夹:gitsubmoduleaddurl_to_repoprojectfolder但随后出现错误:'projectfolder'alreadyexistsintheindex"这是我的存储库所需的结构:repo|--projectfolder|--folderwithcommoncode可以将git子模块直接添加

Git - 致命的 : Unable to create '/path/my_project/.git/index.lock' : File exists

当我尝试将我的项目树移至gitrepo时,我仍然收到此错误消息。我用这个项目检查了我的目录的权限,这些权限设置在777上。在带有my_project的目录中的终端中,我设置:git初始化然后如果我尝试git添加。或gitcommit-m"第一次上传"所以我会得到错误fatal:Unabletocreate'/path/my_proj/.git/index.lock':Fileexists.Ifnoothergitprocessiscurrentlyrunning,thisprobablymeansagitprocesscrashedinthisrepositoryearlier.Mak

php file_exists 返回 false 即使我的 linux 上存在文件

这个问题已经被问过很多次了,但我找到的答案都没有帮助我。我正在尝试让phpfile_exists()工作。它工作的唯一场景是当php文件与要使用file_exist()的文件位于同一目录中并且仅使用文件名(即不包括路径)时。但这不是结果行为,请参见下文。索姆信息:安全模式=关闭目录28没有符号链接(symboliclink)文件名中没有空格/var/www/html/smic/upload/28/中的所有目录都有apache:apache777作为权限。使用php5.3PHP:echogetcwd()clearstatcache();$file='file:///var/www/htm

MySQL OUTFILE 查询提示 "file already exists"但该文件根本不存在

我正在编写一个非常简单的shell脚本来将表格转储到CSV文件中。这是其中的一部分:day=`/bin/date+'%Y-%m-%d'`file="/tmp/table-$day.csv"rm$filequery="SELECT*FROMtableINTOOUTFILE'$file'FIELDSTERMINATEDBY','ENCLOSEDBY'\"'LINESTERMINATEDBY'\\n'"echo"$query"|mysql我放入rm$file以确保该文件在查询执行之前不存在。但是,当我执行脚本时,我收到了相互冲突的消息:rm:cannotremove`/tmp/table-2

linux - SaltStack : creating directory only if does not exists

目前我有以下创建目录的规则/init/dir:file.recurse:-source:salt://init_dir/init-user:name-group:group-name:/path/init-dir_mode:2775-file_mode:777现在我只想在目录不存在的情况下在新的minions上创建一个目录。 最佳答案 虽然您的示例确实有效,但没有必要。file.directory只会尝试创建不存在的目录。 关于linux-SaltStack:creatingdirect

linux - Sed 命令 : how to replace if exists else just insert?

这个问题在这里已经有了答案:Appendingalinetoafileonlyifitdoesnotalreadyexist(23个回答)关闭去年。我需要在一个文件中编辑几行,这样如果一行以(av或avpgw)开头,则将其替换为新文本,否则只需在开头插入新文本。我如何使用sed执行此操作?