diff --git a/hands_on/branch_delete.py b/hands_on/branch_delete.py index cf1af19..f035143 100644 --- a/hands_on/branch_delete.py +++ b/hands_on/branch_delete.py @@ -1,3 +1,4 @@ +import time import os from exercise_utils.file import create_or_update_file @@ -30,4 +31,9 @@ def download(verbose: bool): commit("Add fantasy.txt", verbose) checkout("main", False, verbose) + + # Sleep to ensure that the commit timestamps are different to ensure correct git revision graph in git log + time.sleep(1) + + merge_with_message("textbooks", False, "Merge branch textbooks", verbose) diff --git a/hands_on/branch_rename.py b/hands_on/branch_rename.py index a75d779..929e7ab 100644 --- a/hands_on/branch_rename.py +++ b/hands_on/branch_rename.py @@ -1,3 +1,4 @@ +import time import os from exercise_utils.file import create_or_update_file @@ -43,4 +44,8 @@ def download(verbose: bool): commit("Add fantasy.txt", verbose) checkout("main", False, verbose) + + # Sleep to ensure that the commit timestamps are different to ensure correct git revision graph in git log + time.sleep(1) + merge_with_message("textbooks", False, "Merge branch textbooks", verbose) diff --git a/hands_on/early_branch.py b/hands_on/early_branch.py index a28632b..20a4221 100644 --- a/hands_on/early_branch.py +++ b/hands_on/early_branch.py @@ -1,3 +1,4 @@ +import time import os from exercise_utils.file import create_or_update_file, append_to_file @@ -62,4 +63,8 @@ def download(verbose: bool): checkout("main", False, verbose) append_to_file("tennis.txt", "Martina Navratilova") add(["tennis.txt"], verbose) + + # Sleep to ensure that the commit timestamps are different to ensure correct git revision graph in git log + time.sleep(1) + commit("Add Martina to tennis.txt", verbose)