git最简单最基础使用

91 阅读1分钟
  1. 先config一下用户名和邮箱
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
  1. clone 网址 "\d\abcd"(文件路径可指定,可填可不填,填的话格式要注意不是D:/而是\d\)

  2. 然后把要提交的文件或代码复制粘贴到clone 或者mv "文件路径" "clone下来的仓库路径"(注意路径格式)

  3. git add . 或者git 文件名.后缀

  4. git commit -m "自己填提交了什么"

  5. git push origin main推送到仓库 (main是branch里对应的名字,如果有多分支可以把main换别的名字)