git init 初始化项目
git show 查看最近一次commit的相关信息
git branch -a #查看所有分支
git branch -r #查看远程分支
git branch -vv #查看本地分支所关联的远程分支
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git checkout -b dev remotes/origin/dev 创建本地分支dev , 追踪远程分支 remotes/origin/dev
git branch -u remotes/origin/dev dev 同上
git push --set-upstream origin new_branch 或者 git push -u origin new_branch# Push the new branch, set local branch to track the new remote
git branch --set-upstream-to=origin/daiguojin/feature-spm-797 //将本地分支my-test关联到远程分支my-test上
git rebase -i master
git rebase bugFix master
git config --global credential.helper store 避免每次pull/push都要输入帐号和密码
git merge --abort 安全地撤销合并
git rebase --edit-todo 如果你异常退出了 vi 窗口,输入这个命令返回
gitlab 密码修改后需要运行 git config --global credential.helper wincred 重新输入帐号密码即可