git 命令
stash 相关
-
查看 stash 内容:
git stash show -p stash@{index} -
删除某一个stash 内容
git stash drop stash@{index} -
如果 git stash list 有多条记录,并且你想 pop 第 2 个 stash:
git stash apply stash@{index}
branch 相关
- 删除一个本地分支
git branch -d <local_branch_name> // 安全删除
git branch -D <local_branch_name> // 强制删除 区别是该本地分支有 stash 时
本地新建仓库关联远方
- 新建 git 仓库
git init - 本地仓库关联远方仓库
git remote add origin <origin_repository_name> - 关联后第一次下拉
git fetech - 创建本地分支并关联远方仓库
git checkout -b <local_branch_name> origin/<origin_branch_name> - 推送本地仓库到远方仓库
git push -u origin <local_branch_name>

浙公网安备 33010602011771号