删除远程配置文件
// 删除远程配置文件
git rm --cached -r .idea
git commit -m 'delete .idea'
git push origin master
暂存
// 暂存代码
git stash
// 恢复代码
git stash pop
git stash apply
拉取远程分支
git checkout -b local_branch_name origin/remote_branch_name
删除本地分支和远程分支
删除本地分支
git branch -d 会在删除前检查merge状态(其与上游分支或者与head)
例:git branch -d local_branch_name
git branch -D 是git branch --delete --force的简写,它会直接删除。
例:git branch -D local_branch_name
删除远程分支
git push origin --delete remote_branch_name
删除tag
//删除本地tag
git tag -d tag_name
// 删除远程tag
git push origin :refs/tags/tag_name