Ask Your Question
3

What is the process for identifying all the commits made on a branch between two specific commits?

asked 2023-05-22 14:21:55 +0000

nofretete gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-05-22 14:36:02 +0000

djk gravatar image

The process for identifying all the commits made on a branch between two specific commits is as follows:

  1. Open the command line or terminal on your system.

  2. Navigate to the local repository where you want to identify the commits.

  3. Use the git log command to display the history of commits for the branch. For example, if you want to display the commit history for the master branch, you can use the command:

git log --oneline master
  1. Identify the SHA hashes of the two specific commits between which you want to identify all the commits. You can obtain the SHA hash of a commit by looking at the first few characters of the commit ID displayed in the log output.

  2. Use the git log command again, but this time specify the two SHA hashes as the range of commits. For example, if you want to identify all the commits made on the master branch between the 5th and 10th commits, you can use the command:

git log --oneline 5th_commit_sha..10th_commit_sha

This will display a list of all the commits made on the master branch between the two specified commits, along with their commit messages and SHA hashes.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-22 14:21:55 +0000

Seen: 8 times

Last updated: May 22 '23