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

カテゴリー: Git BASH  閲覧数:200 配信日: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


週間人気ページランキング / 6-21 → 6-27
順位 ページタイトル抜粋 アクセス数
1 ANRIとは? / ジェネラルパートナー株式会社 3
2 Webサービス | ブックマーク 2
2 Git BASH 作業履歴 2022/10/20 / P48 site-rank(First-Ranking-Service) 2 / P25をP48のリポジトリへ反映させていたので、「git push -f origin main」で強制上書き実行 | Git BASH(Git) 2
3 Twitter アカウント管理 | Twitter Developer(Twitter) 1
3 fatal: remote error: is not a valid repository name | Git BASH(Git) 1
3 「Twitter Developers」でアプリケーションを新規作成するためには? SMS認証用コードを確認可能な電話番号の登録が必要 | Twitter Developer(Twitter) 1
3 GitHubリモートリポジトリ名には日本語を使用できない。使用すると、ハイフンへ自動置換されてしまう | GitHub(Git) 1
3 「User is not Authorized」と「Phone number is already in use for too many accounts and cannot be added to another user.」は連動していない | Twitter Developer(Twitter) 1
3 Twitter API v1.1 | Twitter Developer(Twitter) 1
3 開発ブログ / 公開する意味はあるの? / 今後の方針 1
3 既存Twitterアカウントより電話番号を削除すると、どうなるの? 新規アプリ作成する際、再度電話番号を使用したSMS認証が必要になる | Twitter Developer(Twitter) 1
3 Webサイト終了プライベート手順 | Webサービス開発 1
3 「Windows10」へ「gitfor windows VERSION 2.22.0」をインストール | GitHub(Git) 1
3 Twitter API 1.0 | Twitter API 旧仕様(Twitter) 1
3 GitHub(Git) カテゴリー 1
3 コインチェック株式会社   | Webサービスビジネス 1
3 Windows10で使用できるGitクライアント | GitHub(Git) 1
3 「Twitterデータ」対応 | Twitter Developer(Twitter) 1
3 Git BASH(Git) カテゴリー 1
3 「Twitter Developer」審査結果に通り、appを作成。しかし、いつの間にか「User is not Authorized」が表示されていたケース | Twitter API (Twitter) 1
2025/6/28 1:02 更新
指定期間人気ページランキング / 2020-5-27 → 2025-6-27
順位 ページタイトル抜粋 アクセス数
1 GitHubリモートリポジトリ名には日本語を使用できない。使用すると、ハイフンへ自動置換されてしまう | GitHub(開発環境) 1035
2 fatal: remote error: is not a valid repository name | Git BASH(開発環境) 736
3 Twitter アカウント管理 | Twitter Developer(Twitter) 617
4 Twitter API | Twitter API (Twitter) 590
5 動画対応 | プログラミング 589
6 開発 0 585
7 「Twitterデータ」対応 | Twitter Developer(Twitter) 553
8 Windows10で使用できるGitクライアント | GitHub(開発環境) 446
9 本 | ブックマーク 445
10 Webサービス | ブックマーク 422
11 マッチングサービス | Webサービスビジネス 403
12 同じ携帯電話番号でも、複数の「Twitter Developers」アカウントを作成可能 | Twitter Developer(Twitter) 354
13 TwitterOAuth では、画像URL を指定した画像投稿は出来ない(と思う)。ライブラリを使用しなければ出来るから、Twitter API の制限ではない(と思われる)  | Twitter 319
14 技術書籍 | プログラミング 299
15 teratailでは質問しない | プログラミング 293
16 気になった動画 | ブックマーク 292
17 埋め込みツイート | Twitter Developer(Twitter) 271
18 個人事業主 | Webサービスビジネス 250
19 Twitter 電話番号の問題 | Twitter Developer(Twitter) 231
20 コインチェック株式会社   | Webサービスビジネス 200
2025/6/28 1:02 更新