git push interview staging
error: src refspec staging does not match
error: failed to push some refs to 'git@github.com:chienyuan/interview.git' any.
It turn out I delete local staging branch. After I add the staging branch back the problem solved.I still don't know what is the issue here. Let me study a little bits of git reference.
After an hour study, I kind of understand a little big about this refspec things. Here is good linkGit-Internals-The-Refspec.
So now I could just add push rule to .git/config
[remote "interview"]
url = git@github.com:/chienyuan/interview.git
fetch = +refs/heads/*:refs/remotes/interview/*
push = refs/heads/master:refs/heads/staging
Then I could just issue.
git push interviewLesson Learn: Understand the internal is better way for learning git.