Git操作
1、常用命令
# 1、初始化本地库
git init
# 2、查看本地库状态
git status
# 3、添加暂存区
git add 文件名<.指全部文件>
# 4、提交本地库,message表示提交信息
git commit -m "[message]"
# 5、查看版本信息
git reflog #查看版本信息
git log # 查看版本详细信息
# 6、版本穿越
git reset --hard [版本号] #ca10ff4
2、分支操作
# 1、创建分支
git branch 分支名
# 2、查看分支
git branch -v
# 3、修改分支
# 3、 切换分支
git checkout 分支名
# 4、合并分支
git merge 分支名
3、 团队协作
Seting ---> Manage access ---> invite a collaborator
# 起别名
git remote add 别名 仓库URL
# 1、拉取
git pull 别名 分支
# 2、推送
git push 别名 分支
# 3、克隆
git clone 仓库URL
4、跨团队协作
# 1、拉取
fork
# 2、推送
pull request
5、GitLab
免费开源的打码管理平台
评论区