前提・実現したいこと
主にgoとreactからなるファイル群をgithubにあげようとしています
githubにfirst commitしたのですが、create-react-app
で作成したファイル群がgithubではアクセスできません。
このreactのファイル群もgithubでほかと同様に正常にアップロードしたいです。
article
├ api
│ └ main.go
└ client
. └ create-react-appで作成された諸々のreactコンテンツ
試したこと
最初にgit add .
したところ、以下のような警告が出ました
command
1$ git add . 2warning: adding embedded git repository: client 3hint: You've added another git repository inside your current repository. 4hint: Clones of the outer repository will not contain the contents of 5hint: the embedded repository and will not know how to obtain it. 6hint: If you meant to add a submodule, use: 7hint: 8hint: git submodule add <url> client 9hint: 10hint: If you added this path by mistake, you can remove it from the 11hint: index with: 12hint: 13hint: git rm --cached client 14hint: 15hint: See "git help submodule" for more information.
次に以下のコマンドを打ちましたが、git add
時のエラーは解決しませんでした。
command
1$ git rm --cached client 2error: the following file has staged content different from both the 3file and the HEAD: 4 client 5(use -f to force removal) 6$ git rm --cached client -f 7rm 'client'
次に以下のようにclientの.gitを削除したところ、git add
時のエラーは解消されました。
しかしcommit&pushした結果として、client
フォルダ以下のreactパッケージがgithubに反映されていません。
command
1$ rm -rf client/.git
以上お手数ですが、ご教授いただけると幸いです。よろしくお願いいたします。
回答1件
あなたの回答
tips
プレビュー