Skip to content

Commit

Permalink
add example
Browse files Browse the repository at this point in the history
  • Loading branch information
zehengl committed Sep 13, 2024
1 parent aae1401 commit f4e13eb
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/gitgood.py
Original file line number Diff line number Diff line change
@@ -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")

0 comments on commit f4e13eb

Please sign in to comment.