1.创建本地仓库和分支mster后修改代码提交
git add .
git commit
2.然后关联远程仓库
git remote add origin ssh://git@git.xxxxxxxx.git
3.若直接git push
会提示
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin master
所以用
git push --set-upstream origin master