【Tools】【版本控制】Git

Git 版本控制管理 


1. install

#sodu apt install git

2. config

git config --global user.email "name@example.com"
git config --global user.name "your name"

3. 

#git init

#git add some

4. 

config 配置有3个,system级别, global(用户级别) ,local(当前仓库),设置先从system-》global-》local,底层配置会覆盖顶层配置,分别使用--system/global/local 可以定位到配置文件

# git config --system --list

# git config --global  --list

git config --local  --list

手动配置

# git config --global user.name "your name"

# git config --global user.email "name@mail.com"









Git 使用技巧

1. 分支间代码的合并,部分代码合并

# git cherry-pick -n commitId (将commitId 代码 合并到当前分支)

2. Git 分支管理和冲突解决

3. Git cherry-pick 使用小结

4. Git的撤消操作 - 重置, 签出 和 撤消

# git reset commitId (重置提交到指定 commit, 即commitId 之前的提交,都清除)


附:

1. GIT 简易指南

2. GIT 教程

3. 深入理解学习Git工作流(git-workflow-tutorial)

4. Git最常用功能,这一篇就够了!(结合开发场景)

5. 分支的创建与合并

6. Git 教程 (good)

















  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值