Tag Archives: git

git提交时报错Updates were rejected because the tip of your current branch is behind

今天我向mirror仓库备份代码的时候出现点问题 [root@XXX YYY]# git push mirror qc Username for ‘http://10.196.12.247’: root Password for ‘http://[email protected]’: To http://10.196.12.247/root/XXX.git ! [rejected] qc -> qc (non-fast-forward) error: failed to push some refs to ‘http://10.196.12.247/root/XXX.git’ hint: Updates were rejected because the tip of your current … Continue reading

Posted in gitlab | Tagged , | Leave a comment

GIT命令大全

CREAT(创建) git init 在当前目录下创建一个本(Create a new local repository) git clone  ssh://[email protected]/repo.git 在远程库克隆一个本地库(Clone an existing repository) Configuration(配置) git config [–global] user.name 设置提交时附带的名字(Set the name attached to all your commits) git config [–global] user.email 设置提交时附带的email(Set the email attached to all your commits) … Continue reading

Posted in gitlab | Tagged , | Leave a comment

git多个远程仓库管理

我在项目管理时需要实时备份代码,于是想到部署一个备份仓库用来备份代码,查了下资料,发现这篇文章最全面,搬运了过来,感谢原作者,原连接是 https://www.cnblogs.com/bwar/p/9297343.html git多个远程仓库 1. 前言 用GitHub管理自己的开源项目有几年了,最近一年更新得比较多,仓库也越来越多越来越大。有时候感觉GitHub太慢,尤其是最近感觉更为明显,于是萌生了再找个国内类似GitHub的代码托管平台的想法,同时我也还想持续更新GitHub上的仓库,于是需要一个本地仓库(我自己的开发机)多个远程仓库(Github、码云、coding)。 2. 一个远程仓库的git config 我的开源项目Nebula一个基于事件驱动的高性能TCP网络框架的git配置文件.git/config如下: [core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [remote “origin”] url = https://github.com/Bwar/Nebula.git fetch = +refs/heads/*:refs/remotes/origin/* [branch “master”] remote = origin merge = refs/heads/master 3. … Continue reading

Posted in gitlab | Tagged | Leave a comment