以上是我在各大平台收集整理的git内容,作为我学习git的学习笔记
Git 是一个开源的分布式版本控制系统,用于敏捷高效地处理任何或小或大的项目。
克隆项目
git clone +下载地址
提交代码的步骤
1.同步远程仓库代码:git pull
git pull
2.查看当前状态:git status 这个一定要养成习惯
git status
3.提交代码到本地git缓存区:git add
git add .
4.推送代码到本地git库:git commit
git commit -m "XXXXXXX"
5.提交本地代码到远程仓库:git push
git push
查看当前分支 git branch
创建分支 git branch <name>
切换分支 git switch <name> 或者 git checkout <name>
创建+切换分支 git checkout -b <name> 或者 git switch -c <name>
删除分支 git branch -d <name>
合并某分支到当前分支 git merge <name>