我已经在Linux服务器上克隆了git存储库,并且能够运行git fetch, git status, git log命令。
我在运行git pull时遇到一个错误,如下所示:
git: 'pull' is not a git command. See 'git --help'.
Did you mean this?
shell
如何解决此错误。
我正在使用git命令在Linux machine.When上拉取存储库,我使用git pull it命令提示我提交消息,如下所示
Please enter a commit message to explain why this merge is necessary,especially if it merges an updated upstream into a topic branch
如何使用现有的git pull命令禁用此提示消息?
下面是我使用的git命令
sudo git pull https://someusername:somepassword@someproject.vis
正在使用Git 1.7.4.1,但是得到了以下错误: $ git pull
….
M selenium/ant/build.properties
….
M selenium/scripts/linux/get_latest_updates.sh
M selenium/scripts/windows/start-selenium.bat
Pull is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm <
的答案是用于linux命令行。我需要同样的Windows命令行。我使用创建了下面的代码,但是我的代码不起作用。
for /D /r %i in (*.*) do (cd %i && echo %i && git pull && cd ..)
更新
从@Seven11-en的回答和@kostix的评论中可以看出以下的效果。
for /D %%i in (.\*) do (cd "%%i" && git pull && cd..)
或
for /D %%i in (*) do (cd "%%i&
我已经习惯了使用git,这是我第一次收到这个我不明白的错误。
在Linux上做了一个新的克隆
# git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean
即使我知道一切都在更新:
# git pull
error: preserve: 'preserve' superseded by 'merges'
fatal: invalid value for 'pull.re
所以,事情是这样的:
matthijs@xx:xx (master)$ ant -v update
Apache Ant version 1.6.5 compiled on January 6 2007
Buildfile: build.xml
Detected Java version: 1.5 in: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.85.x86_64/jre
Detected OS: Linux
parsing buildfile /var/www/xx/xx/xx/build.xml with URI = file:///var/ww
我使用的是Git 1.7.4.1。
我想从存储库中获取最新版本的代码,但我收到了错误:
$ git pull
….
M selenium/ant/build.properties
….
M selenium/scripts/linux/get_latest_updates.sh
M selenium/scripts/windows/start-selenium.bat
Pull is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use
现在,我从Linus Torvalds和/或Gitster那里看到了很多这样的提交:
Merge branch 'maint' of git://github.com/git-l10n/git-po into maint …
* 'maint' of git://github.com/git-l10n/git-po:
l10n: de.po: fix a few minor typos
或者:
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upst… …
…r
我在windows subsystem for linux (WSL)下签出了一个git repo。repo之前是使用git for windows在文件系统上创建的,我习惯于从windows和WSL访问它。
我定期从WSL的备用遥控器(git pull alt_remote master)同步。通常,这将触发合并提交,编辑器打开,我保存消息,合并完成。
取而代之的是,pull列出了pull中的一些文件子集,这表明我有将被销毁的本地更改,并且我需要提交或隐藏它们。我没有对这些文件进行任何更改。
几秒钟后,我再次尝试相同的命令,它成功了,就好像没有问题一样。
我怀疑新行策略和git如何修改文件以