diff --git a/git_assistant/git_tutorial.py b/git_assistant/git_tutorial.py index 2197e6d2d3d34e47751dd84adf15d6bc1f05ec38..17767e3d211785af28550021b52f22bae0794d43 100644 --- a/git_assistant/git_tutorial.py +++ b/git_assistant/git_tutorial.py @@ -26,6 +26,8 @@ password = colored('password', 'cyan') token = colored('token', 'cyan') gitlab = colored('GitLab', 'cyan') github = colored('GitHub', 'cyan') +green = colored('Green', 'green') +red = colored('Red', 'red') copy = colored("COPY", "green", attrs=['reverse']) paste = colored("PASTE", "green", attrs=['reverse']) @@ -116,7 +118,7 @@ A {git} remote origin is the name for the remote repository of a {git} directory. If you try to execute {git} commands in the wrong remote repository, you will encounter errors. To make sure this do not happen while running the tutorial, we are going to remove the previous -origin. +origin just in case. """ print(rm_message) @@ -131,7 +133,7 @@ os.system("clear") origin_message = f""" Now, let's add a new origin. You will need to provide the url of the -{git} repo where you want to you {git} {push}. +{git} repo where you want to {git} {push}. """ print(origin_message) @@ -168,8 +170,8 @@ os.system("clear") # Git status status_message = f""" {git} status shows the current state of your {git} working directory -and staging area. Green shows file in {git} repository, committed -with latest changes. Red shows file in {git} repository, but with +and staging area. {green} shows file in {git} repository, committed +with latest changes. {red} shows file in {git} repository, but with latest changes that have not been committed. If you do not {add} the red files before committing, these files will not be included in your {commit}. @@ -184,10 +186,10 @@ input(f"\nDone! Press {enter} to continue.\n") # Git add add_message =f""" -To {git} {add}, you have to pick a file in red from the list -above and copy the name. Then, paste the name of your file -and do not forget the extension (example.ipynb). -or type {allfiles} to add all the files in the directory. +To {git} {add}, you have to pick a file in {red} from the +status list above and copy the name. Then, paste the name +of your file and do not forget the extension (example.ipynb), +or type {allfiles} to {add} all the files in the directory. """ print(add_message) file = input(str(f"Please paste the name of your file or type {allfiles}: ")) @@ -258,7 +260,8 @@ os.system(f"git push {url}") input(f"\nDone! Press {enter} to continue.\n") # Check the git push -print(f"Go to:\n{url}\nto see if the {push} was successful.") +print(f"Go to:\n{url}\nto see if the {push} was successful.\n" + f"Check out the master branch if you do not see the file in the main branch.") push_answer = input(str("Has your file been pushed correctly? y/n: ")) while push_answer =="n":