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 代码 合并到当前分支)
# git reset commitId (重置提交到指定 commit, 即commitId 之前的提交,都清除)
附:
1. GIT 简易指南
2. GIT 教程
3. 深入理解学习Git工作流(git-workflow-tutorial)
5. 分支的创建与合并