From f4e13ebebf68b4aafce8d350ace269c4da674f91 Mon Sep 17 00:00:00 2001 From: Zeheng Li Date: Fri, 13 Sep 2024 09:26:58 -0600 Subject: [PATCH] add example --- src/gitgood.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/gitgood.py diff --git a/src/gitgood.py b/src/gitgood.py new file mode 100644 index 0000000..cc84ef1 --- /dev/null +++ b/src/gitgood.py @@ -0,0 +1,16 @@ +f = [] +g = set() +for _ in range(int(input())): + a, b = input().split() + if a == "cd": + if b == "..": + f.pop() + else: + f.append(b) + else: + g.add("/".join(f + [b])) +if g: + for i in sorted(g): + print(f"git add {i}") + print("git commit") + print("git push")