警告: git command could not be found. Please create an alias or add it to yo

5 Answers

active oldest votes


up vote 57 down voteaccepted

It sounds like you recently updated GitHub application and Git Shell is now broken.

Short version

To fix it

  • close Git Shell
  • open GitHub and let it do some post installation.
  • Open Git Shell again and you should be fixed.

其实出现这个问题很可能是因为使用github for windows 的小伙伴更新了git shell所产生的。

上面的三点其实就是三个步骤:

1)关闭git shell

2)打开gitHub

3)重新打开Gitshell即可

其实照着上面的做就行了。如果不行的再照着下面的尝试一下哈~~~~(因为我照着上面的做就解决问题了)


Long version

This just happened to me and just to make sure I follow you, you just did this

  • Open Git Shell
  • You are prompted to update GitHub
  • After the update, Git Shell opens

Now it gives the error

git command could not be found. Please create an alias or add it to your PATH.

Warning: Could not find ssh-agent.

If this is the case, do this

  • Close Git Shell
  • Now open the GitHub application (not Git Shell).

This will say something along the lines of (not sure of the exact version)

GitHub is extracting git..

Let that go through the process and after it is complete, go open Git Shell and it is fixed. Just worked for me at least.

时间: 2024-10-06 07:49:17

警告: git command could not be found. Please create an alias or add it to yo的相关文章

[Practical Git] Navigate git command pager output with Unix less commands

When using a git command that can have a large amount of output (like git log, git diff, or git blame), Git opens the command output in our terminal "pager"; on most modern Unix-based systems, the default pager will be "less". Learning

git: not a git command

在一台linux机器上打git命令,显示: git: 'pull' is not a git command. See 'git --help'. Did you mean this?         shell 莫名的错误,再敲 $ git --exec-path $ /usr/local/linux/git/libexec/git-core 发现这个路径不存在,找到git-core正确的安装位置,重新设置环境变量即可 $ export GIT_EXEC_PATH=$RIGHT_PATH 或者

Linux下提示 git: command not found

1.出错原因: 服务器没有安装GIT,所以导致出错. 解决办法: 1)Centos下使用:yum install git -y  或者  yum install -y git .  (centos6.8) 2)Ubuntu/Debian下使用 : apt-get install git -y Linux – git: command not found 原文地址:https://www.cnblogs.com/victorcode/p/10150694.html

SalesforceXyTools For Sublime Support Git Command

SalesforceXytoolsForSublime is Rapid development tools for Salesforce Development. From v2.1.7 Support git command , Github Wiki SalesforceXyTools Support Git Command Lable Command Description git:version git --version git:gui git gui git:init git in

Git Command #05 分支操作

git branch 列出所有本地分支 不包含遠端分支 可查看目前所在分支 git branch [Branch] 建立分支,但維持在目前的分支 git branch [Branch] [Reflog] 將特定 Reflog 建立分支,維持在目前分支 git branch -d [Branch] 刪除該分支 無法刪除當前的分支 git branch -a 大专栏  Git Command #05 分支操作 列出所有分支 包含遠端分支 git checkout git checkout [Bran

-bash: git: command not found

最近在测试openstack,没想到刚敲俩行就报 再看下配置 vim /etc/profile -bash: vim: command not found 一定是源选择了最小化安装的centos了 yum install git ok

One git command may cause you hacked(CVE-2014-9390)

0x00 背景 CVE-2014-9390是最近很火的一个漏洞,一个git命令就可能导致你被黑,我不打算深入探讨这个漏洞的细节,官方已经在https://github.com/blog/1938-git-client-vulnerability-announced 和http://article.gmane.org/gmane.linux.kernel/1853266发布了详细信息.总之,如果你使用了大小写不敏感的操作系统例如Windows或OSX,你应该更新git客户端了. 让我们以渗透测试的

git command

Git 远程分支管理 git pull --no-ff # 抓取远程仓库所有分支更新并合并到本地,不要快进合并 git fetch origin # 抓取远程仓库更新 git merge origin/master # 将远程主分支合并到本地当前分支 git co --track origin/branch # 跟踪某个远程分支创建相应的本地分支 git co -b <local_branch> origin/<remote_branch> # 基于远程分支创建本地分支,功能同上

fuck--Fix git command line spelling errors GitHub

修复Git输入错误,挺有意思.git命令关键字如果输入错误,会提示最接近的正确关键字,如果提示内容是你想要的,输入'fuck',就能执行了. GitHub源码.源码生成exe,windows上运行. 使用方法readme中.