Skip to content

Instantly share code, notes, and snippets.

@kjugk
Last active March 6, 2023 01:59
Show Gist options
  • Save kjugk/bad9afb6768c17fde1e2 to your computer and use it in GitHub Desktop.
Save kjugk/bad9afb6768c17fde1e2 to your computer and use it in GitHub Desktop.
#git Git command cheatsheet

現在のブランチ名を表示

git branch --show-current

リモート branch を local に pull する

git branch new_branch_name origin/new_branch_name

branch を作る

git checkout -b new_branch_name

git のログを grep する

git grep 'hgeohge'

log の diff を表示する

git log -p -2

直前の commit を取り消す

git reset HEAD^

conflict した git rebase を元に戻す

git rebase --abort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment