git命令总结(一)

①登录https://github.com/ 

new ⇒Create a new repository

复制下面URL

https://github.com/lzqdiy/fastapi_sample.git

②本地创建文件夹github

③安装tortoiseGit,在github上右键选择 git bash here

<clone>

git clone https://github.com/lzqdiy/fastapi_sample.git

将需要提交的文件拷贝到

github\fastapi_sample

cd fastapi_sample

 

<add all files>

git add .

<commit>

git commit -m "commit message"

<status>

git status

<push>

git push

或者

git push origin main

 <discard changes>

git checkout -- xx.py

 

posted @ 2023-08-09 21:27  我为P狂  阅读(8)  评论(0)    收藏  举报