git init
##连接到远程仓库
git remote add <remote-name> <remote-url>
###如果连接不上
unable to access 'https://github.com/Orign-al/STM32H743VIT6_CODE.git/': OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
https://blog.csdn.net/qq_43546721/article/details/139506583
##更改由于main和master问题导致的上传失败
https://blog.csdn.net/mo_sss/article/details/137927136
git add 文件名
git commit -m "提交说明"
git status
git log
你可以通过以下命令将所有已经缓存但未提交的文件移除:
git rm -r --cached .
你可以通过以下命令将所有已经缓存但未提交的文件移除:
git lfs install
git lfs track "*.mp4"
git add .gitattributes
git add .
git commit -m "Use Git LFS for large files"
git push origin master
git rm --cached "文件路径"
git commit -m "Remove large files"
git push origin master
- 回退到上一个版本
git reset --hard HEAD^
- 回退到指定版本
git reset --hard 版本号
git clone 版本库地址
git push
git pull
git branch 分支名
git checkout 分支名
git merge 分支名
git branch -d 分支名
git mergetool
git reset HEAD 文件名
git checkout -- 文件名
git reset --hard origin/分支名
git fetch origin 分支名:本地分支名
git push origin 分支名
git push -u origin 分支名
git clone 版本库地址
git clone 版本库地址 目录名
git clone -b 分支名 版本库地址