Git Note

branch rename

// 克隆git项目到本地
git clone https://github.com/xxx/xxx.git

// 查看所有分支
git branch -a

// 删除远程分支(非主分支)
git push --delete origin xxx

// 重命名本地分支
git branch -m xxx ooo

// 推送本地分支
git push origin ooo

git rebase

// 克隆git项目到本地
git clone https://github.com/xxx/xxx.git

// 添加远程仓库
git remote add username https://github.com/xxx/xxx.git

// 更新分支
git fetch username

// rebase
git rebase username/branch

// 有冲突的话需要解决冲突
[fix conflict]
[git-add]
[git rebase --continue]

// 提交更改
git push

// 发起PR
pull request on website

你可能感兴趣的:(Git Note)