GitHub勉強会で使用します
https://github.com/kanazawazawa/github-workshop
GitHub Fork クリック
GitHub Code クリック, SSH クリック, Copy
ターミナルでクローンする
git clone [email protected]:yourname/github-workshop.gitcd github-workshop/URL確認
git remote -vmain, master, dev 等永続ブランチで直接作業しないようにする
ブランチを作成してチェックアウト
git checkout -b post-yournameターミナルのブランチ名が変更していることを確認する
git branch_posts の中に、YYYY-MM-DD-title.md ファイルを作成します。
例:2022-06-10-GitHub勉強会.md
ステイタスを確認し、ステージングエリアに登録、コミットする。
git status
git add -A
git commit -m "post yourname"
git statusmain ブランチとの diff を確認する
git diff mainブランチをプッシュ!
git push origin <ご自身が設定したブランチ名>GitHub Compare & request クリック
Leave a comment
Create pull request クリック
(参考)Fork を最新にする
GitHub Fetch upstream クリック
(参考)プルして最新の状態にする
git pull origin mainコントリビューションしてみよう
-
Checkout Windows-style, commit Unix-style line endings
コミット時 CRLF→LF、ワークツリーに反映時 LF→CRLF -
Checkout as-is, commit Unix-style line endings
コミット時 CRLF→LF -
Checkout as-is, commit as-is
改行コードを変換しない -
SSH
ssh-keygen -t ed25519 -C "[email protected]"Enter file in which to save the key
Enter
Enter passphrase
key をコピーする
clip < /c/Users/yourname/.ssh/id_ed25519.pubGitHub Settings, SSH and GPG Keys, New SSH key
- user.name, user.email
git config --global user.name yournamegit config --global user.email [email protected]git confit --listワークツリー
↓
ステージングエリア
↓
Gitディレクトリ
https://code.visualstudio.com/
https://github.com/skills/introduction-to-github/
https://github.com/skills/github-pages/