リモートでgit commitしてからリモート(github)へpushする方法
リモートでgit commitしてからリモート(github)へpushする方法
普通は、githubでnewRepositoryを押して、git init @hogeをターミナルで実行する。
しかし、今回はローカルで
git init git commit -m "" git push
したことによりエラーが出た。
エラー
要はRepositoryを作れというエラー
git push [master] fatal: No configured push destination. Either specify the URL from the command-line or configure a remote repository using git remote add <name> <url> and then push using the remote name git push <name>
解決策
git remote add origin git@github.com:alexpchin/<reponame>.git git push -u origin master
gitのみで完結できないかと調べたけど面倒なので終わり。