Git学习

安装配置

https://blog.csdn.net/weixin_44406127/article/details/137540031

Git-Github版本控制可视化教程

https://www.youtube.com/watch?v=S7XpTAnSDL4

初始检测

git --version //查看命令是否可用
git config --global user.name 'your github name' //因为就是用的GitHub的仓库,所以绑定这个,如果有自己的git仓库,则是绑定其它地址
git config --global user.email 'xx@xx.com'

repo

一个项目相当于一个文件夹,而仓库就是用来存多个文件夹的。

git init //初始化一个仓库

image-20241005191031546

我这里没有提示分支名称的警告,但我git branch也没有发现分支

git config --global init.defaultBranch main

但我这里创建了,没什么反应