開発中のウェブサイトがあります。github はhttps://github.com/samclark2015/Project-Emeraldです。サブディレクトリのユーザーフォルダーの下にリポジトリがあります。サイトを github にプッシュすると、ツリーが Sites/Project Emerald/... として更新されます。github リポジトリのルートにあるプロジェクト emerald フォルダーの内容が必要です。PC でレポのルートを変更するにはどうすればよいですか?
1 に答える
0
GitHub リポジトリで最初のコミットを行ったばかりなので、最も簡単な方法は次のとおりです。
- ' ' の下にあるローカル
.git
ディレクトリを削除しますSite
- リポジトリをローカルに再作成し、強制的にプッシュします。
それは次のようになります:
# in Site/Project-Emerald
git init .
git add remote origin https://samclark2015@github.com/samclark2015/Project-Emerald.git
git add .
git commit -m "first commit, again"
git push -force origin master
次に、GitHub リポジトリに直接表示されます。
PHP
SpryAssets
pictures
README
config.inc
...
他の代替手段については、「My Git repository is in the wrong root directory. Can I move it? ( ../
instead of ./
)」に記載されています。
于 2012-04-18T06:11:33.213 に答える