How can I find the merge commit given a Git commit?
Looking for the merge commit where the changes from a given commit were merged into a branch? Here's how you can find it.
The Git snippet collection contains a variety of short tips and tricks for all currently maintained versions of git. It includes most commonly-used commands and covers various use-cases in the form of simplified documentation, complete with multiple examples.
Looking for the merge commit where the changes from a given commit were merged into a branch? Here's how you can find it.
View all commits in a specific date range using git log
.
Learn how to view all commits that manipulated a specific string in a Git repository.
Ever wanted to commit as someone else? Maybe change the author of an existing commit? Here's how.
Learn how to filter branches based on whether they contain a specific commit or not.
Altering Git history to split a commit sounds intimidating, but it's not that hard. Let's walk through the process step by step.
Have you ever made a commit only to realize that a file should not have been included? Let's see how you can fix this!
If you're looking for a way to find commits by a specific author or committer in a Git repository, look no further.
Learn the simple way to undo a commit in Git without rewriting history.
Did you make a mistake but haven't pushed your changes yet? Learn how to rewind back to a specific commit in Git.
If you find yourself needing to fix a previous commit, you can create a fixup commit that can be autosquashed in the next rebase.
Learn how to view the last commit in Git using the git log
command.
Learn how to view a short summary of your Git commits using git log.
Learn how to leverage the power of git grep
to find matching files in your repository.
Learn how to create a new commit in Git, along with tricks to skip Git hooks and create empty commits.
Manually or automatically find which commit in history introduced a bug using.
Learn how to effortlessly amend the last commit's message or contents using Git and fix any mistakes you might have made.
Learn how to apply changes introduced by one or more commits to your current branch (cherry-picking).
Ever needed to create a git commit with a different date? Here's a quick and easy way to do it.
Learn how to effectively use Git's staging area, by adding or removing files from it.
View differences between staged or unstaged changes and the last commit in Git.