git clone~pushするまでの一覧の流れ
# clone
git clone [repo]
# ブランチを切る
git checkout -b [branch_name]
※リモートリポジトリを行う場合下記で実施
git checkout -b [local branch_name] origin/[remote branch_name]
# ローカル変更、テスト実施
# ファイルを追加
git add [filename]
# ファイルをコミット
git commit -m "commit message"
# ファイルをリモートリポジトリにpush
git push --dry-run origin [branch_name]
git push origin [branch_name]
gitのaddを取り消す
git reset HEAD (filename)
ローカルで削除したものをgitに反映
# 方法1
git add -u #u is Update
# 方法2
git rm filename
直前のコミットログ修正
git commit --amend
push
//dry-runは必ず行う
git push --dry-run origin branch:branch
git push -origin branch:branch
log
//1行のみ
git log --oneline
//graph表示
git log --graph --oneline
参考資料
https://qiita.com/nabezokodaikon/items/7ee4900d28d8d863978e
https://qiita.com/cyokodog@github/items/c66417aacb903afb472a