Git常用操作
LiuL0703 opened this issue · comments
LiuL0703 commented
Git
git 删除远程分支:git push origin --delete{}
git查看远程分支:git branch -r
git 切换远程分支:git checkout [name]
git stash 保存当前修改 但不提交commit
git stash apply{stash@{n}} 回到某个stash状态
将某次提交应用到指定分支
git checkout {branch-name}
git cherry-pick {hash}
重命名分支名
- Rename your local branch.
git branch -m new-name
- Delete the old-name remote branch and push the new-name local branch.
git push origin :old-name new-name
- Reset the upstream branch for the new-name local branch.
git push origin -u new-name