git push异常具体如下(一般发生在首次推送):
No refs in common and none specified; doing nothing. Perhaps you should specify a branch such as 'master'
没有指定推送到哪个分支里去。
解决方案:使用 git push origin master 可以指定推送该远程库的主分支去
git init
git remote add origin http://dev.gitlab.com/root/test.git
git add .
git commit -m "init file
git push origin master
error: failed to push some refs to 'http://dev.gitlab.com/root/test.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
git checkout master
git pull origin master 或者 git pull origin master --allow-unrelated-histories