git tag v1.1 -m“说明信息”
git show v1.1
git tag -d v1.1
git push origin tag v1.1
git push -f origin master 强制推送
git config –global user.name “填写自己的用户名” # 配置个人用户名
git config –global user.email 填写自己的邮箱号 #电子邮件地址
$ git branch * br-2.1.2.2 master
$ git branch -r origin/HEAD -> origin/master origin/feature/IOS_visualtrack origin/feature/android_visualtrack origin/master
$ git branch -a * br-2.1.2.2 master remotes/origin/HEAD -> origin/master remotes/origin/br-2.1.2.1 remotes/origin/br-2.1.2.2 remotes/origin/br-2.1.3 remotes/origin/master $git branch --remote 查看远程分支
$ git branch -a * master remotes/origin/HEAD -> origin/master remotes/origin/Release remotes/origin/master $ git checkout -b myRelease origin/Release Branch myRelease set up to track remote branch Release from origin. Switched to a new branch 'myRelease'
作用是checkout远程的Release分支,在本地起名为myRelease分支,并切换到本地的myRelase分支
合并前要先切回要并入的分支
以下表示要把issue1234分支合并入master分支
$: git checkout master $: git merge issue1234 Merge made by recursive. README | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
git checkout branch_name 切换某个分支 git checkout -b branch_name 以当前分支未基础建立新分支并且切换过去 git checkout -f 强制替换与分支不一样的文件 git checkout path 撤销某个未提交文件恢复原状 git checkout . 撤销所有未提交文件恢复原状 git checkout --ours path 冲突中以当前分支未基准 git checkout --theirs path 冲突中以对方分支未基准''
要开vpn
git config –global http.proxy socks5:127.0.0.1:1080
git config –global https.proxy socks5:127.0.0.1:1080
取消指令:
git config –global –unset http.proxy
git config –global –unset https.prox
git config --global https.proxy http://127.0.0.1:1080 git config --global https.proxy https://127.0.0.1:1080 查询是否使用代理:git config --global http.proxy 取消代理:git config --global --unset http.proxy git config --global --unset http.proxy git config --global --unset https.proxy npm config delete proxy git config --global http.proxy 'socks5://127.0.0.1:1080' git config --global https.proxy 'socks5://127.0.0.1:1080'
git config --global http.sslVerify "false"