We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc2dade commit cba3a0cCopy full SHA for cba3a0c
reset_branch.sh
@@ -10,10 +10,13 @@ current_branch=$(git rev-parse --abbrev-ref HEAD)
10
temp_branch="${current_branch}_temp"
11
git checkout -b $temp_branch
12
13
-# Get all commit hashes
14
-commits=$(git log --format=%H)
+# Get the starting commit
+start_commit="91ac6c5366d02d9f906d5e25463c7f3edae6f165"
15
16
-# Iterate through commits in reverse order
+# Get all commit hashes from the starting commit to HEAD
17
+commits=$(git rev-list --reverse $start_commit..HEAD)
18
+
19
+# Iterate through commits
20
for commit in $commits; do
21
# Check if the commit is a merge commit
22
if [ $(git rev-parse $commit^2 2>/dev/null) ]; then
0 commit comments