我是靠谱客的博主 拼搏雨,最近开发中收集的这篇文章主要介绍警告: git command could not be found. Please create an alias or add it to yo,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

5 Answers

active  oldest  votes
up vote  57  down vote accepted

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.

最后

以上就是拼搏雨为你收集整理的警告: git command could not be found. Please create an alias or add it to yo的全部内容,希望文章能够帮你解决警告: git command could not be found. Please create an alias or add it to yo所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(41)

评论列表共有 0 条评论

立即
投稿
返回
顶部