🗂
github cliとgit入門する
今までguiでやってたからそろそろターミナルでやりたい
めも
- github cli
- git
の導入は済んでいるものとする
状況確認
変更状況の確認
git status
コミット履歴
git log
コミット関連
コミット対象に
git add .
git add <file name>
コミット
git commit
ブランチ関連
ブランチ作成
git branch <new branch name>
ブランチ切り替え
git checkout <branch name>
マージ
git merge <branch name>
リモート連携
プル
git pull
プッシュ
git push
フェッチ
git fetch
リポジトリ
リポジトリ作成
gh repo create <repo name>
クローン
gh repo clone <repo name>
issue
issue作成
gh issue create
issue一覧
gh issue list
pull request
PR作成
gh pr create
PR一覧の表示
gh pr list
PRを試す
gh pr checkout <number>
差分表示
gh pr diff <number>
レビュー
gh pr review <number>
PRのマージ
gh pr merge <number>
取り消し
add
git reset HEAD <file name>
commit
git reset --hard(soft) HEAD^
push
git reset --hard <hash>
git push -f
Discussion