Skip to content

Instantly share code, notes, and snippets.

@ogawatti
Created August 23, 2022 04:19
Show Gist options
  • Save ogawatti/f7fd4083aea2381e6058b6c08686883e to your computer and use it in GitHub Desktop.
Save ogawatti/f7fd4083aea2381e6058b6c08686883e to your computer and use it in GitHub Desktop.
git command refs
# grep
git grep -e 'hoge' -e 'fuga'
git grep -- ':!node_modules/'
# cherry-pick
git cherry-pick COMMIT_ID
git cherry-pick -m 1 MERGE_COMMIT_ID
git cherry-pick COMMIT_ID_A..COMMIT_ID_B # Aは該当IDの一つ前
# create branch from tag
git checkout -b tag1.0.0 refs/tags/1.0.0
# stash
git stash pop stash@{N} # N番目のstackをpopして適用
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment