git init git add yourproject git commit -m "first commit" git remot add origin git@ssh地址 git push -u origin master
$ git push -u origin master To email@example.com:kaasia/studyjava.git ! [rejected] master -> master (fetch first) error: failed to push some refs to 'firstname.lastname@example.org:kaasia/studyjava.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
git pull origin master git push -u orgin master