草庐IT

ensure_dir_exists

全部标签

sql - 使用 Postgres 时为 "Operator does not exist: integer =?"

我在go的database/sql包提供的QueryRow方法中调用了一个简单的SQL查询。import("github.com/codegangsta/martini""github.com/martini-contrib/render""net/http""database/sql""fmt"_"github.com/lib/pq"))typeUserstruct{Namestring}funcShow(db*sql.DB,paramsmartini.Params){id:=params["id"]row:=db.QueryRow("SELECTnameFROMusersWHERE

git 克隆 --bare : fatal: repository does not exist

我在debianWheezy上使用git版本1.7.10.4。我正在尝试创建一个新的存储库(根据git-scm.com的“手册”)但是每次我得到这个fatalerror:fatal:repository'poekoe'doesnotexist这就是我在命令行输入的内容:gitclone--bare--progresspoekoepoekoe.git我还在sqeeze发行版上尝试过,效果很好。(squeeze上的git版本是:gitversion1.7.2.5)wheezy发行版中所有已安装的软件包是:libcurl4-gnutls-devlibexpat1-devgettextviml

git bash 无法推送分支,错误消息为 : "object directory does not exist"

最近我将我的GitBash更新到最新版本,现在当我尝试将分支推送到远程服务器时,我收到一条错误消息:$gitpush--set-upstreamoriginbugs/purlin_support_reactionsCountingobjects:41,done.Deltacompressionusingupto4threads.Compressingobjects:100%(41/41),done.Writingobjects:100%(41/41),4.91KiB|0bytes/s,done.Total41(delta33),reused0(delta0)remote:error:o

git - git : "already exists and is not a valid git repo" 错误

看来我不能这样做:gitsubmoduleadd-fgit@github.com:thephpleague/oauth2-server.gitlibs/OAuth/functions因为这个:'libs/OAuth/functions'已经存在并且不是有效的gitrepo我只是不明白。它不存在于任何地方。我的计算机上是否stash了另一个我不知道的git配置文件?我尝试删除.git并再次pull所有没有做任何事情的东西。有什么想法吗?我也试过这个:gitls-files--stagefunctions当我在libs/OAuth中时,我一无所获。然后我试了一下:sudogitrm--ca

git - 如何解决 Git 错误 "the requested upstream branch ' upstream/master' does not exist"

我正在尝试按照一些步骤为GitHub上的存储库做贡献,但其中一个步骤不起作用。步骤在这里:https://github.com/wdbm/qTox/blob/master/CONTRIBUTING.md#how-to-open-a-pull-request.我在GitHub上创建了存储库。我克隆存储库:gitclonehttps://github.com//qTox.git我访问本地仓库的目录:cdqTox我添加上游远程以便能够从上游存储库获取:gitremoteaddupstreamhttps://github.com/qTox/qTox.git我尝试将本地主分支指向上游存储库:gi

git - 如何正确执行 git merge/pull : You have not concluded your merge (MERGE_HEAD exists)

我是Git的新手,不太了解如何使用Git。我一直在使用CVS,因此经历了一些Git的学习曲线。这是我所有的尝试现在我只更改了两个文件PromoServiceImpl.java和build.sql。但是,merge从“产品”分支更改时遇到麻烦。您看到的剩余文件(如ApiServiceImpl.java等)是其他用户所做的更改,但我不确定此处的表示是否表明我已更改它们。可能它在早期的pull命令中被merge了,现在它希望我提交它们??无论我遵循什么命令流程(即使经过一些Google搜索)我都会看到以下错误:Youhavenotconcludedyourmerge(MERGE_HEADex

Git - 致命的 : remote origin already exists

我无法使用remote命令远程创建源:$gitremoteaddoriginhttps://github.com/LongKnight/git-basics.gitfatal:remoteoriginalreadyexists.为了解决这个错误,我试过这个:$gitremote-vorigin$gitremote-vshoworigin它没有将文件从我的本地存储库上传到远程:$gitpush-uoriginmasterfatal:'origin'doesnotappeartobeagitrepositoryfatal:Couldnotreadfromremoterepository.P

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 错误 : conq: repository does not exist

我在使用BitBucket的Git中遇到以下错误:conq:repositorydoesnotexist.fatal:Theremoteendhungupunexpectedly如何解决这个问题?我执行了以下操作:gitinit.gitremoteaddorigingit@bitbucket.org:myname/myproject.gitgitadd.gitcommit-m"..."gitpush我已经使用sshkey设置了BitBucket,repo显示在仪表板上。 最佳答案 在我的例子中,git存储库以某种方式在配置文件中被复

git - .gitignore 规则之间有和没有尾部斜杠的区别,如/dir 和/dir/

Git存储库中.gitignore文件中的/dir和/dir/有区别吗?以下有何不同?/dir/dir//dir/* 最佳答案 是的,这些规则是不同的。/dir将匹配文件、目录、链接、任何名为dir的内容/dir/将匹配仅名为dir的目录/dir/*将匹配所有文件、目录和里面的任何其他内容名为dir的目录(但不是dir目录本身)。/dir、/dir/和/dir/*是不等价的。区别在使用覆盖规则时非常清晰,比如著名的!.gitkeep绕过跟踪空目录的限制。认为文件dir/.gitkeep的存在使用/dir和/dir/,Git甚至不会查