Git git push 失败的问题。求帮助。

surgit · April 18, 2013 · Last by surgit replied at April 18, 2013 · 7163 hits
git status
# On branch source
nothing to commit (working directory clean)

# git push origin master
error: src refspec master does not match any.
error: failed to push some refs to '[email protected]:***/***.github.com.git'

git commit -am "message"
# On branch source
nothing to commit (working directory clean)

但是 github 上面显示不出内容呢。

git branch -a 看看

你这个地址对么? '[email protected]:/.github.com.git'。没提交上去啊

#2 楼 @sandy_xu 地址是对的。 #1 楼 @mouse_lin

git branch -a
* source
  remotes/octopress/2.1
  remotes/octopress/HEAD -> octopress/master
  remotes/octopress/colorize
  remotes/octopress/gh-pages
  remotes/octopress/guard
  remotes/octopress/linklog
  remotes/octopress/master
  remotes/octopress/migrator
  remotes/octopress/plugin-install
  remotes/octopress/refactor_with_tests
  remotes/octopress/rubygemcli
  remotes/octopress/site
  remotes/octopress/site-2.1
  remotes/origin/master
  remotes/rubyless/master

怎么那么多。。。。

贴一下 .git/config 文件内容。

source 跟 master 不匹配吧?

git push origin source:source

难道不应该是git push origin source 你的 master 分支是在 rake gen_deploy 的时候用的,自己只需要同步 source 分支

git push origin master -f 不行可以看看这里

你是用的 octopress?

在根目录下使用 git push origin source _deploy 分支使用 git push origin master

分别提交到 source 分支和 master 分支

谢谢,已经捣鼓好了…

You need to Sign in before reply, if you don't have an account, please Sign up first.