提交自己的project代码到远程仓库

git 常用命令

前提

首先确保环境变量添加了git路径

image

然后,建立远程仓库---> 击复制SSH:

image

接下来,本地磁盘建一个本地仓库,注意:本地仓库名应该与github仓库名保持一致,例如:

image

然后一行一行的在git bush中输入以下命令:
echo "# purchase_project" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin git@e.coding.net:poowicat/mdf-h5desensitizationtool/Main.git
git push -u origin maste

出现以下,表示成功:
image

vscode 部分

查看配置状态

在vscode工具中,打开本地仓库目录,使用终端,输入git status,表示vscode已配置好git
git status
image

提交已修改的到远程仓库

# 依次在本project终端输入以下命令:
git add .
git commit -m '你的本次提交描述...'
git push
# over~~~

最后查看提交后的状态

image

表示我的项目已提交成功。

posted @ 2021-06-22 14:18  poowicat  阅读(61)  评论(0编辑  收藏  举报