git本地分支操作
1.HEAD
- Related with current active branch
- Always point to the latest commit
2.Git Branch
-
git branch 查看当前分支
-
git checkout (change the current active branch)
-
git branch branchName 创建分支
.git/refs/heads 生成对应的指针 内容指向最新的commit object
-
分支合并:https://www.liaoxuefeng.com/wiki/896043488029600/900003767775424
3. 关联远程仓库
- git add remote origin url:本地config文件里生成对应的远程库信息
- git push 本地.git文件变化:
图片来源:https://www.bilibili.com/video/BV1JA411v7S9