git 什么是git命令以打开存储库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10176703/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 06:46:43  来源:igfitidea点击:

what is the git command so as to open a repository

git

提问by Stephane Rolland

I'm learning Git using Git Extension which provide graphical user interface.

我正在使用提供图形用户界面的 Git 扩展来学习 Git。

But I have to do a command that I have not found in Git Extension. ( I want to do git checkout -- myFileso as to revert it).

但是我必须执行一个我在 Git Extension 中没有找到的命令。(我想这样git checkout -- myFile做是为了恢复它)。

So I was going to try with command line... However when i launch Git Bash, I cannot open the repository I am working on. I have not found any command that resemble to this ( git-open or something like that)

所以我打算尝试使用命令行......但是当我启动 Git Bash 时,我无法打开我正在处理的存储库。我没有找到任何与此类似的命令( git-open 或类似的东西)

Any idea what I am missing ?

知道我缺少什么吗?

回答by Lars Nystr?m

You do not need to "open" your repository, just cdto the directory.

您不需要“打开”您的存储库,只需打开cd目录即可。

回答by James Black

From GitExtension, open your repository, then you can open git bash and do what you want.

从 GitExtension 打开您的存储库,然后您可以打开 git bash 并执行您想要的操作。

Or, start git bash, then cd to the directory where your code is (at the top level), but, I find it easier to just start with GitExtension so I don't have to think about what I had typed as the top of my src.

或者,启动 git bash,然后 cd 到你的代码所在的目录(在顶层),但是,我发现从 GitExtension 开始更容易,所以我不必考虑我输入的内容作为顶部我的源。