1.远程与本地冲突
git pull origin
error: Your local changes to the following files would be overwritten by merge:
recallctr-topology.iml
src/main/java/com/wifi/recall/factorctr/DocMatrixCounter.java
Please commit your changes or stash them before you merge.
Aborting
1.git stash 先保持本地改动,可用来暂存当前正在进行的工作, 比如想pull 最新代码,又不想加新commit,或者另外一种情况,为了fix 一个紧急的bug, 先stash, 使返回到自己上一个commit, 改完bug之后再stash pop, 继续原来的工作
2.git pull 拉起远程最新分支
3.git stash pop 合并自己的跟新
git branch --set-upstream-to=origin/dev dev
$ git checkout -b dev origin/dev
git push origin dev
git branch -r
git clone romete 默认只是clone远程remote的master,不会clone其他的目录
git branch -a
git checkout .
git checkout -b localBranch origin/branchName (不加origin/branchName部分只是在本地建立分支,而不是获取远程分支)
git checkout -t origin/branchName
默认会在本地建立一个和远程分支名字一样的分支
或者fetch来做
git fetch origin remoteBranchName:localBranchName
1.git tag 查看远程tag
2.检出目标tag
git checkout tagName