Skip to content

Instantly share code, notes, and snippets.

@tehmoon
Last active August 22, 2018 19:40
Show Gist options
  • Save tehmoon/21fec26a655d5ca1373be4ccee7061d1 to your computer and use it in GitHub Desktop.
Save tehmoon/21fec26a655d5ca1373be4ccee7061d1 to your computer and use it in GitHub Desktop.
Git/github stuff

extract the whole forked branch from merge commit:

git log @~1..@^2

Get all the tags that contain the commit:

git tag --contain <commit>

Get all the commits without the merge-commits and cherry-pick

git log --no-merges --cherry-pick --remove-empty <commit/commit_range>

Remove remote branch

git branch -d <branch> # or -D
git push --delete origin <branch>

Remove remote tag:

git tag -d <tag>
git push origin :refs/tags/<tag>

Search issues with user's comments:

is:issue commenter:<user>

Search filename/path/extension

filename: <file> extension: <ext> path:<path> <keyword>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment