Skip to content

Instantly share code, notes, and snippets.

@4383
Last active June 16, 2020 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 4383/2a87ef065b931348f96b11357b7f2ecc to your computer and use it in GitHub Desktop.
Save 4383/2a87ef065b931348f96b11357b7f2ecc to your computer and use it in GitHub Desktop.
git edit first commit
# rebase from the first commit included
git rebase -i --root
# generate a tiny changelog
git log --no-merges <tag or commit-id>.. --oneline
# search if a branch contains a specific commit
git branch --contains <commit-id>
##################
# retrieve some history
# on specific file
git rev-list --all -- "*reproducer.rst"
git log --name-only --oneline --all -- "*reproducer.rst"
# display date and authors
git log --oneline --no-merges --pretty=format:"%h%x09%an%x09%ad%x09%s" v2.1.4..v4.2.0
# Which commit (sha only) deleted a file
git log --format=%H --all --diff-filter=D -- puppet/services/docker.yaml
# List since a file was deleted (since openstack branch)
git branch -r --contains $(git log --format=%H --all --diff-filter=D -- puppet/services/docker.yaml) | grep -v master | sort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment