shinoblog-manabu

Progate(プロゲート)を使って初歩の初歩からプログラミング勉強をはじめました。無料から有料バージョンへ以降しつつ、自分辞書として活用しています。なるべく私と同じ初心者目線を使い、各プログラミング内容を説明したいです。

【Git】新規プロジェクトを立ち上げる【GitHub】

f:id:shinoblog-manabu:20220129074949j:plain

Gitの基本的ワークフローの、全体的な流れをみていこう



 

git 

f:id:shinoblog-manabu:20220129062536p:plain

 

 

f:id:shinoblog-manabu:20220129062731p:plain

C:/Users/shinobu-code/Desktop/intro_git/.git/ にある既存のGitリポジトリの再初期化を行いました。

 

 

 

ここで問題発生/vimが動作しない問題

f:id:shinoblog-manabu:20220129071906p:plain

これでいいの?何か違うような・・・・。
エラーになってしまった

hint: エディタがファイルを閉じるのを待ちます... エラー。There was a problem with the editor '"C:♪Users ♪shinobu-code ♪AppData ♪Local ♪Programs ♪Microsoft VS Code ♪" --wait'.
メッセージを-mまたは-Fオプションで提供してください。

hint: Waiting for your editor to close the file... error: There was a problem with the editor '"C:\Users\shinobu-code\AppData\Local\Programs\Microsoft VS Code\bin\code" --wait'.
Please supply the message using either -m or -F option.

 

エディタがファイルを閉じるのを待ちます・・・とは?

正常に終了していないよねこれ・・。

上記pdfより正式な手順を確認できる。が、 i を押しても特に変化がない。どうすれば・・・

how_to_edit_commit_message.pdf

 

もう一度挑戦してみた結果・・。

何が何だか分からないよ・・。

$ git commit
masterブランチでは
あなたのブランチは 'origin/master' より 2 コミット分進んでいます。
  (ローカルでのコミットを公開するには "git push" を使用します)

コミットするものがない、作業ツリーがきれい

$ git commit
On branch master
Your branch is ahead of 'origin/master' by 2 commits.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean

 

 

>>2 コミット分進んでいます

つまり次の作業に行け?ということなのかな。

 

 

GitHubへプッシュしていこう

f:id:shinoblog-manabu:20220129073825p:plain

イケたか・・?

$ git push -u origin master
オブジェクトを列挙しています。8個、完了。
オブジェクトをカウントしています。100% (8/8)、完了。
最大20スレッドを使ったデルタ圧縮
オブジェクトを圧縮する。100%(4/4)、完了。
オブジェクトの書き込み。100% (6/6), 583 bytes | 583.00 KiB/s, done.
合計 6 (デルタ 2)、再利用 0 (デルタ 0)、パック再利用 0
リモートで デルタを解決する。100% (2/2)、1つのローカルオブジェクトで完了。
https://github.com/aitojyounetu/intro_git.git
   8326d38..b26fec5 マスター -> マスター

 

$ git push -u origin master
Enumerating objects: 8, done.
Counting objects: 100% (8/8), done.
Delta compression using up to 20 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (6/6), 583 bytes | 583.00 KiB/s, done.
Total 6 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (2/2), completed with 1 local object.
To https://github.com/aitojyounetu/intro_git.git
   8326d38..b26fec5  master -> master

 

Check GitHub to see if it has been committed.

f:id:shinoblog-manabu:20220129074149p:plain

完成

 

このワークフローが一連の流れ作業となる。

"vimが動作しない問題" は実は動画とともに一度出来ており、確認のために実行したが出来なかった、というもの。

一度できていたから実行できなかった??という結論に至った。(ここが不透明。ご存知の方いらっしゃいましたらご教授頂ければ幸いです)