How can I tell if one commit is an ancestor of another commit (or vice-versa)?

Use git merge-base –is-ancestor <commit1> <commit2> There is more than one way to find the answer to this. The simplest is to use git merge-base –is-ancestor <possible-ancestor-commit> <commit> From the documentation for git merge-base: –is-ancestor Check if the first <commit> is an ancestor of the second <commit>, and exit with status 0 if true, or … Read more

How can I view the Git history in Visual Studio Code?

I recommend you this repository, https://github.com/DonJayamanne/gitHistoryVSCode Git History It does exactly what you need and has these features: View the details of a commit, such as author name, email, date, committer name, email, date and comments. View a previous copy of the file or compare it against the local workspace version or a previous version. … Read more