プロジェクト新規作成 / プロジェクト追加作成

カテゴリー: Git BASH  閲覧数:304 配信日:2022-10-21 02:08


プロジェクト新規作成


1
(main)
$ cd /L/1_Hp/0_sakura/2018server/var/www/html/p-28

2
$ git init
Initialized empty Git repository in L:/1_Hp/0_sakura/2018server/var/www/html/p-28/.git/


3
順調なのは、ここまでだった。
(main)
$ git remote add origin git@github.com:GitHubユーザー名/P28-4th-Ranking-Service.git

迷1
他の「.git」ディレクトリが存在した状態のまま下記gitコマンドを実行したため、意図せず「submodule」化されてしまう
(main)
$ git add -A
warning: adding embedded git repository: △△
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint:   git submodule add <url> △△
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint:   git rm --cached △△
hint:
hint: See "git help submodule" for more information.


迷2
ここで、「.git」ディレクトリを手動削除後、再度下記コマンドを実行したが、多分この処理が誤り。
(未確認だけれども恐らく)既に「submodule」化されているのだから、後で実行している「$ git rm -rf --cached △△」を「$ git add -A」の前に実行した方が良かったと思われ。
(main)
$ git add -A

(main)
$ git commit -m "first commit"
[main (root-commit) b626c3b] first commit
119 files changed, 33294 insertions(+)
create mode 100644 0webapp/LICENSE
create mode 100644 0webapp/MiniBlogApplication.php


「$ git fetch」不要かと思ったが、必要みたい。
(main)
$ git merge --allow-unrelated-histories origin/main
merge: origin/main - not something we can merge

(main)
$ git fetch
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), 637 bytes | 6.00 KiB/s, done.
From github.com:GitHubユーザー名/P28-4th-Ranking-Service
* [new branch]      main       -> origin/main


(main)
$ git merge --allow-unrelated-histories origin/main
Merge made by the 'ort' strategy.
README.md | 2 ++
1 file changed, 2 insertions(+)
create mode 100644 README.md

(main)
$ git push origin main
Enumerating objects: 117, done.
Counting objects: 100% (117/117), done.
Delta compression using up to 8 threads
Compressing objects: 100% (114/114), done.
Writing objects: 100% (116/116), 170.32 KiB | 1.08 MiB/s, done.
Total 116 (delta 26), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (26/26), done.
To github.com:GitHubユーザー名/P28-4th-Ranking-Service.git
  5a53ab5..76ceace  main -> main


(main)
$ git rm -rf --cached △△
rm '△△'


(main)
$ git add -A

(main)
$ git commit -m "public_html 以下"
[main 3fb24ef] public_html 以下
597 files changed, 122353 insertions(+), 1 deletion(-)



(main)
$ git push origin main
Enumerating objects: 619, done.
Counting objects: 100% (619/619), done.
Delta compression using up to 8 threads
Compressing objects: 100% (599/599), done.
Writing objects: 100% (618/618), 109.27 MiB | 3.31 MiB/s, done.
Total 618 (delta 60), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (60/60), completed with 1 local object.
To github.com:GitHubユーザー名/P28-4th-Ranking-Service.git
  76ceace..3fb24ef  main -> main


プロジェクト追加作成


10.配置
今回は「SQL dumpdata」を配置。

11
(main)
$ git add -A

12
(main)
$ git commit -m "SQL dumpdata"
[main ebcbce8] SQL dumpdata
1 file changed, 682 insertions(+)
create mode 100644 mode_siterankin.sql


13
(main)
$ git push origin main
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 20.23 KiB | 1.01 MiB/s, done.
Total 3 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To github.com:GitHubユーザー名/P28-4th-Ranking-Service.git
  3fb24ef..ebcbce8  main -> main



20.配置
今回は「スクリーンキャプチャ」を配置。

21
(main)
$ git add -A

22
(main)
$ git commit -m "Screen capture"
[main a6a38fc] Screen capture
2 files changed, 31542 insertions(+)


23
(main)
$ git push origin main
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 8 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 319.44 KiB | 3.76 MiB/s, done.
Total 4 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), done.
To github.com:GitHubユーザー名/P28-4th-Ranking-Service.git
  ebcbce8..a6a38fc  main -> main


週間人気ページランキング / 9-1 → 9-7
順位 ページタイトル抜粋 アクセス数
1 デザイン カテゴリー 2
2 GitHub への PUSH へ 1回成功したぐらいでは、Git 理解したことには全然ならない | Git BASH(Git) 1
2 次回検証 / 入力順番を間違えたためグダグダになってしまった例 1
2 「ロボットによる操作ではないことを確認してください」と表示されているにも関わらず、確認する方法が案内されている場合は、ブラウザキャッシュを削除する | Twitter Developer(Twitter) 1
2 Twitter API Oauth / Application-only authentication: Oauth2 (bearer token) / Application-user authentication: Oauth 1a (access token for user context) 1
2 リファクタは、開発が一区切りついた段階でなるべく実行した方が良い | Webサービス開発 1
2 6.ローカルリポジトリに、リモートリポジトリを設定する / ローカルリポジトリに設定されている、リモートリポジトリ内容を一覧表示(URLも表示) / ローカルリポジトリ(mainブランチ)(の変更)を送信して、リモートリポジトリ(「origin」上の同名ブランチ)へ反映させる 1
2 キーワード「@4532_hachi」検索結果一覧 1
2 Webサイト制作履歴 | Webサービス開発 1
2 注意点 / 準備編 /理想とするプロジェクト新規作成手順 1
2 「丁寧さ」をどうするの? / 以前作成したhelpを確認してみる / 色々迷う 1
2 SFC(プログラミング) カテゴリー 1
2 鍵に保存されたパスフレーズを変更 / (Windowsならでは)「File name too long」エラー対処 / (Windowsならでは)改行コードを自動変換しないよう設定 1
2 server カテゴリー 1
2 A.データをどこで保存するか? / B.収益をどう見込むか / C.既存サービスが既に存在しているのに、新たに作成する意義はあるか 1
2 Twitter実装記録 / A.Twitter指定キーワード検索 1
2 ログイン 1
2 技術書籍 | プログラミング 1
2 開発 0 1
2026/9/8 5:05 更新
指定期間人気ページランキング / 2020-5-27 → 2026-9-7
順位 ページタイトル抜粋 アクセス数
1 GitHubリモートリポジトリ名には日本語を使用できない。使用すると、ハイフンへ自動置換されてしまう | GitHub(Git) 1084
2 開発 0 757
3 fatal: remote error: is not a valid repository name | Git BASH(Git) 754
4 Twitter アカウント管理 | Twitter Developer(Twitter) 629
5 Twitter API | Twitter API (Twitter) 605
6 動画対応 | プログラミング 598
7 「Twitterデータ」対応 | Twitter Developer(Twitter) 569
8 Windows10で使用できるGitクライアント | GitHub(Git) 471
9 本 | ブックマーク 464
10 Webサービス | ブックマーク 435
11 マッチングサービス | Webサービスビジネス 411
12 同じ携帯電話番号でも、複数の「Twitter Developers」アカウントを作成可能 | Twitter Developer(Twitter) 374
13 TwitterOAuth では、画像URL を指定した画像投稿は出来ない(と思う)。ライブラリを使用しなければ出来るから、Twitter API の制限ではない(と思われる)  | Twitter 334
14 技術書籍 | プログラミング 310
15 teratailでは質問しない | プログラミング 309
16 気になった動画 | ブックマーク 300
17 埋め込みツイート | Twitter Developer(Twitter) 278
18 ログイン 260
19 個人事業主 | Webサービスビジネス 256
20 Twitter 電話番号の問題 | Twitter Developer(Twitter) 248
2026/9/8 5:05 更新