Skip to content

Commit ca0e735

Browse files
committed
Add comments to document commit ordering fix
1 parent 804784b commit ca0e735

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

hands_on/branch_delete.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,9 @@ def download(verbose: bool):
3131
commit("Add fantasy.txt", verbose)
3232

3333
checkout("main", False, verbose)
34+
35+
# Sleep to ensure that the commit timestamps are different to ensure correct git revision graph in git log
3436
time.sleep(1)
37+
38+
3539
merge_with_message("textbooks", False, "Merge branch textbooks", verbose)

hands_on/branch_rename.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,8 @@ def download(verbose: bool):
4444
commit("Add fantasy.txt", verbose)
4545

4646
checkout("main", False, verbose)
47+
48+
# Sleep to ensure that the commit timestamps are different to ensure correct git revision graph in git log
4749
time.sleep(1)
50+
4851
merge_with_message("textbooks", False, "Merge branch textbooks", verbose)

hands_on/early_branch.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,8 @@ def download(verbose: bool):
6363
checkout("main", False, verbose)
6464
append_to_file("tennis.txt", "Martina Navratilova")
6565
add(["tennis.txt"], verbose)
66+
67+
# Sleep to ensure that the commit timestamps are different to ensure correct git revision graph in git log
6668
time.sleep(1)
69+
6770
commit("Add Martina to tennis.txt", verbose)

0 commit comments

Comments
 (0)