git简单用法 kay 2024-03-29 Git Git 首次创建 / 推送123456789101112# 首次创建新的存储库git initgit add README.mdgit commit -m "first commit"git branch -M main # 与远程仓库中的分支对应git remote add origin https://github.com/it-kay/234324.gitgit push -u origin main# 从命令行中推送到现有的存储库git remote add origin https://github.com/it-kay/234324.gitgit branch -M main # 与远程仓库中的分支对应git push -u origin main 删除远程库中指定文件123git rm -r --cached a/2.txt //删除a目录下的2.txt文件 删除a目录git rm -r --cached agit commit -m "删除a目录下的2.txt文件" git push