最初に結論 / 経緯 / 作業履歴

カテゴリー: GitHub  閲覧数:346 配信日:2020-05-31 14:13


最初に結論


作業内容に自信を持てない場合は、バックアップを事前に必ず取得しておく
挙動を理解していないコマンドは、極力打たないよう努める

経緯


本日、「プライベートニュース」プロジェクトを使用中止した
正常動作しているため、GitHubへ保存しておこうと思いつく

最期に、GitHubへコミットしたのは約一年前
2019-06-24
※今日は2020/5/31
 
安易に考えていた
コミットに成功したことがあるので、すぐに出来るだろう、と安易に考えていた、

作業履歴


Git BASH 起動
ショートカットをクリック
L:\9.soft\Git\git-bash.exe --cd-to-home


cd
作業ディレクトリ(Lドライブの「/3_開発/git/p11/」)へ移動する
user@xxxx /c
$ cd /L

user@xxxx /L
$ cd 3_開発/git/p11

git init
作業ディレクトリ内へ、Gitの(空の)ローカルリポジトリを作成する
user@xxxx /L/3_開発/git/p11
$ git init
Initialized empty Git repository in L:/3_開発/git/p11/.git/


git add -A
作業ディレクトリ内にあるファイルを全てコミット候補にする
user@xxxx /L/3_開発/git/p11
$ git add -A
warning: adding embedded git repository: privatenews.xxxx.xxxx
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> privatenews.xxxx.xxxx
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint:   git rm --cached privatenews.xxxx.xxxx
hint:
hint: See "git help submodule" for more information.


ここで問題が発生
この対応を誤り、ソースコードを意図せず削除してしまう

警告メッセージ内容は?
今回コミット候補にしたディレクトリ内に、別のローカルリポジトリが含まれているようだ

ここで対応を誤った
「$ git add -A」を一旦取り消し、別のローカルリポジトリを削除後、再度「$ git add -A」を実行したかったが、ここで対応を誤ってしまう

Git BASH を使用して、Windows10 から GitHub へ PUSH しようとするも、誤ってソースコードを削除してしまった
→ 後悔している

週間人気ページランキング / 4-18 → 4-24
順位 ページタイトル抜粋 アクセス数
1 GitHubリモートリポジトリ名には日本語を使用できない。使用すると、ハイフンへ自動置換されてしまう | GitHub(Git) 8
2 Windows10で使用できるGitクライアント | GitHub(Git) 6
2 動画対応 | プログラミング 6
3 Twitter API v1.1 | Twitter Developer(Twitter) 4
4 開発 0 3
4 Twitter アカウント管理 | Twitter Developer(Twitter) 3
4 本 | ブックマーク 3
5 同じ携帯電話番号でも、複数の「Twitter Developers」アカウントを作成可能 | Twitter Developer(Twitter) 2
6 Amazonアソシエイト・プログラム 1
6 「公式サポートページでユーザ同士が回答し合う体裁」を採用しているAPI / 制限事項の詳細を中途半端にしか公開していないAPI / 問い合わせ先が、別サービスの海外掲示板になっているAPI 1
6 「Twitter Developers」でアプリケーションを新規作成するためには? SMS認証用コードを確認可能な電話番号の登録が必要 | Twitter Developer(Twitter) 1
6 Twitter API | Twitter API (Twitter) 1
6 fatal: remote error: is not a valid repository name | Git BASH(Git) 1
6 アカウント作成 1
6 RTだけ表示するやつ / 2020/3/20時点の結論 / Link 1
6 0.GitHub リモートリポジトリ作成 / 1.「Git BASH」起動 / 2.ディレクトリ移動 1
6 個人事業主が導入可能な「支払、送金」機能を有する決済系サービス簡易比較表 1
6 TwitterOAuth では、画像URL を指定した画像投稿は出来ない(と思う)。ライブラリを使用しなければ出来るから、Twitter API の制限ではない(と思われる)  | Twitter 1
2024/4/25 1:02 更新
指定期間人気ページランキング / 2020-5-27 → 2024-4-24
順位 ページタイトル抜粋 アクセス数
1 GitHubリモートリポジトリ名には日本語を使用できない。使用すると、ハイフンへ自動置換されてしまう | GitHub(開発環境) 889
2 fatal: remote error: is not a valid repository name | Git BASH(開発環境) 653
3 Twitter アカウント管理 | Twitter Developer(Twitter) 601
4 動画対応 | プログラミング 566
5 Twitter API | Twitter API (Twitter) 563
6 「Twitterデータ」対応 | Twitter Developer(Twitter) 502
7 開発 0 475
8 本 | ブックマーク 427
9 Webサービス | ブックマーク 414
10 マッチングサービス | Webサービスビジネス 401
11 Windows10で使用できるGitクライアント | GitHub(開発環境) 368
12 同じ携帯電話番号でも、複数の「Twitter Developers」アカウントを作成可能 | Twitter Developer(Twitter) 296
13 技術書籍 | プログラミング 294
14 気になった動画 | ブックマーク 286
15 埋め込みツイート | Twitter Developer(Twitter) 269
16 TwitterOAuth では、画像URL を指定した画像投稿は出来ない(と思う)。ライブラリを使用しなければ出来るから、Twitter API の制限ではない(と思われる)  | Twitter 267
17 個人事業主 | Webサービスビジネス 250
18 teratailでは質問しない | プログラミング 246
19 Twitter 電話番号の問題 | Twitter Developer(Twitter) 204
20 過去の「0文字引用RT」を期間指定して取得しようとするも、挫折 | Twitter API (Twitter) 178
2024/4/25 1:02 更新