git配置
[remote"origin"]
fetch=+refs/heads/*:refs/remotes/origin/*
url=ssh://[email protected]:22022/ddshow/ddshow.git
url=ssh://[email protected]:22022/gitroot/ddshow
大家可以使用如图配置,默认origin源配置2个地址,这样push会往gforge和gitlab上同时推送;fetch时选择第一个源拉代码;另外,可以在本地执行gitfetch-p,可以将本地已经不使用的远程分支清理掉
gitpushoriginHEAD,推送时,同时往2个源推送,避免有人本地配置有问题,导致2个head不一致丢代码
gitbranch-a
*dev-1177
master-lf
master-opm
remotes/origin/HEAD->origin/master-lf
remotes/origin/dev-1071.7.1
remotes/origin/dev-1071.8
remotes/origin/dev-1071.9
remotes/origin/dev-1119
remotes/origin/dev-1159
remotes/origin/dev-1175
remotes/origin/dev-1176
remotes/origin/dev-1177
remotes/origin/dev-1177.1
remotes/origin/dev-1179
remotes/origin/dev-1180
remotes/origin/dev-1181
remotes/origin/dev-1184
remotes/origin/dev-1187
remotes/origin/dev-1189
remotes/origin/dev-1191
remotes/origin/dev-1192
remotes/origin/dev-1193
remotes/origin/dev-1208
remotes/origin/dev-1211
remotes/origin/dev-1212
remotes/origin/dev-1213.1
remotes/origin/dev-1215
remotes/origin/dev-1218
remotes/origin/dev-1219.1
remotes/origin/dev-1220
remotes/origin/dev-1221
remotes/origin/master-api
remotes/origin/master-lf
remotes/origin/master-opm
gitsymbolic-refrefs/remotes/origin/HEADrefs/remotes/origin/<default-branch>
gitsymbolic-refrefs/remotes/origin/HEADrefs/remotes/origin/master-lf
http://stackoverflow.com/questions/18570982/intellij-error-branch-origin-head-does-not-point-at-a-commit-some-refs-could