GitHubを使いたいのですがファイルをリモートリボジトリにプッシュできずに困っています。
git add test.txt git commit -m "最初のコミット"
で
Terminal (zsh) Committer: xxxxxx <xxxx@MacBook-Air.local> Your name and email address were configured automatically based on your username and hostname. Please check that they are accurate. You can suppress this message by setting them explicitly. Run the following command and follow the instructions in your editor to edit your configuration file: git config --global --edit After doing this, you may fix the identity used for this commit with: git commit --amend --reset-author 1 file changed, 1 insertion(+) create mode 100644 test.txt
が返ってきて、
git remote add origin https://github.com/User_ID/Test.git git push origin master
で
Username for 'https://github.com': User_ID Password for 'https://User_ID@github.com': To https://github.com/User_ID/PearStainDetector.git ! [rejected] master -> master (fetch first) error: failed to push some refs to 'https://github.com/User_ID/Test.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.
が返ってきました。hintにgit pull
と書いてあったので、
git pull
したら
warning: no common commits remote: Counting objects: 3, done. remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 Unpacking objects: 100% (3/3), done. From https://github.com/User_ID/Test * [new branch] master -> origin/master There is no tracking information for the current branch. Please specify which branch you want to merge with.
と返ってきました。
どうすればリモートリポジトリにtest.txtをプッシュできるのでしょうか?
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。