Skip to content
Snippets Groups Projects
Commit 895bad08 authored by María José Ramos's avatar María José Ramos
Browse files

fixed git tutorial

parent d236622b
No related branches found
No related tags found
No related merge requests found
...@@ -26,6 +26,8 @@ password = colored('password', 'cyan') ...@@ -26,6 +26,8 @@ password = colored('password', 'cyan')
token = colored('token', 'cyan') token = colored('token', 'cyan')
gitlab = colored('GitLab', 'cyan') gitlab = colored('GitLab', 'cyan')
github = colored('GitHub', 'cyan') github = colored('GitHub', 'cyan')
green = colored('Green', 'green')
red = colored('Red', 'red')
copy = colored("COPY", "green", attrs=['reverse']) copy = colored("COPY", "green", attrs=['reverse'])
paste = colored("PASTE", "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} ...@@ -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 directory. If you try to execute {git} commands in the wrong remote
repository, you will encounter errors. To make sure this do not repository, you will encounter errors. To make sure this do not
happen while running the tutorial, we are going to remove the previous happen while running the tutorial, we are going to remove the previous
origin. origin just in case.
""" """
print(rm_message) print(rm_message)
...@@ -131,7 +133,7 @@ os.system("clear") ...@@ -131,7 +133,7 @@ os.system("clear")
origin_message = f""" origin_message = f"""
Now, let's add a new origin. You will need to provide the url of the 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) print(origin_message)
...@@ -168,8 +170,8 @@ os.system("clear") ...@@ -168,8 +170,8 @@ os.system("clear")
# Git status # Git status
status_message = f""" status_message = f"""
{git} status shows the current state of your {git} working directory {git} status shows the current state of your {git} working directory
and staging area. Green shows file in {git} repository, committed and staging area. {green} shows file in {git} repository, committed
with latest changes. Red shows file in {git} repository, but with with latest changes. {red} shows file in {git} repository, but with
latest changes that have not been committed. If you do not {add} the latest changes that have not been committed. If you do not {add} the
red files before committing, these files will not be included in red files before committing, these files will not be included in
your {commit}. your {commit}.
...@@ -184,10 +186,10 @@ input(f"\nDone! Press {enter} to continue.\n") ...@@ -184,10 +186,10 @@ input(f"\nDone! Press {enter} to continue.\n")
# Git add # Git add
add_message =f""" add_message =f"""
To {git} {add}, you have to pick a file in red from the list To {git} {add}, you have to pick a file in {red} from the
above and copy the name. Then, paste the name of your file status list above and copy the name. Then, paste the name
and do not forget the extension (example.ipynb). of your file and do not forget the extension (example.ipynb),
or type {allfiles} to add all the files in the directory. or type {allfiles} to {add} all the files in the directory.
""" """
print(add_message) print(add_message)
file = input(str(f"Please paste the name of your file or type {allfiles}: ")) file = input(str(f"Please paste the name of your file or type {allfiles}: "))
...@@ -258,7 +260,8 @@ os.system(f"git push {url}") ...@@ -258,7 +260,8 @@ os.system(f"git push {url}")
input(f"\nDone! Press {enter} to continue.\n") input(f"\nDone! Press {enter} to continue.\n")
# Check the git push # 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: ")) push_answer = input(str("Has your file been pushed correctly? y/n: "))
while push_answer =="n": while push_answer =="n":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment