To display the list of commits that are ancestors of the current commit up to a specified commit in Git, you can use the following command:
git log <commit>..HEAD
Here, <commit> should be replaced with the specific commit hash (or reference) you want to go up to. This command will show all commits from the specified commit to the current commit in the branch you are on.
If you want to see the commits in a more compact form, you could add the --oneline option like this:
git log <commit>..HEAD --oneline
This will display the commits in a summarized format, showing just the commit hashes and messages.