如何使用 VS Code 向 Github 添加新项目 [英] How to add a new project to Github using VS Code
问题描述
到目前为止我看到的所有教程都表明首先在 github 上创建一个存储库,将链接复制到 vscode 和 git clone
它,然后,您可以进行提交和推送.
这是正确的方法吗?我不能从 vscode 开始一个项目,然后将它上传到我的 git 吗?
编辑 2020 年:
您现在可以直接在 vscode 中完成!只需按照以下步骤操作:
1- 用 vscode 打开你的新项目文件夹
2- 单击侧边栏上的源控制菜单 (或按 Ctrl+Shift+G)
3- 点击发布到 github
4- 从那里只需登录并按照说明操作即可.
@Debu 的回答详细说明了每一步,所以你可以
添加一个 README.md
文件(如果您还没有要添加的内容)
<块引用>
点击在Github上发布
<块引用>
随心选择
<块引用>
选择要包含在首次提交中的文件.
注意:如果您不选择文件或文件夹,它将添加到 .gitignore
文件
<块引用>
你可以走了.已发布.
附言如果这是你第一次.提示将要求您提供 Github 凭据,然后您就可以开始了.已发布.
All the tutorials i've seen till now shows to first create a repository on github, copy the link go to vscode and git clone
it and from that on, you can do commits and pushes.
Is that the right way ? can't I just start a project from vscode and then upload it to my git ?
EDIT 2020 :
You can now do it right inside vscode! just follow these steps:
1- Open your new project folder with vscode
2- click on the source conrol menu on the sidebar (or press Ctrl+Shift+G)
3- Click on publish to github
4- From there just login and follow the instructions and you're good to go.
@Debu's answer details every step, so you can jump to there
Well, It's quite easy.
Open your local project.
Add a README.md
file (If you don't have anything to add yet)
Click on Publish on Github
Choose as you wish
Choose the files you want to include in firt commit.
Note: If you don't select a file or folder it will added to .gitignore
file
You are good to go. it is published.
P.S. If this was you first time. A prompt will ask for for your Github Credentials fill those and you are good to go. It is published.
这篇关于如何使用 VS Code 向 Github 添加新项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!