Tech Meets Art - POETRIQUE online
This is part 2 of a series I began with this post. Here, I will be explaining how to push existing code to a new and empty Github repository.
"Coding is a beautiful thing. Anyone can learn to code!"
~ @Usheninte
Copy the HTTPS
link provided.
Run git init
in the terminal. This will initialize the folder/repository that you have on your local computer system.
Run git add .
in the terminal. This will track any changes made to the folder on your system, since the last commit. As this is the first time you are committing the contents of the folder, it will add everything.
Run git commit -m"insert Message here"
. This will prepare the added/tracked changes to the folder on your system for pushing to Github. Here, insert Message here can be replaced with any relevant commit message of your choice.
Run git remote add origin https://github.com/Usheninte/example.git
in the terminal. Here, Usheninte and example will be replaced by the values provided in the copied link. This will push the existing folder on you local computer system, to the newly created Github repository.
Run git remote -v
. This does some git pull and git push magic, to ensure that the contents of your new Github repository, and the folder on you local system are the same.
Run git push origin master
. Note that the last word in the command master, is not a fixed entry when running git push
. It can be replaced with any relevant “branch_name”.
This is just Part 2 in a series. Please reach out, if I have made any error, or if there is any part of this article I could have explained better. My email is at the footer of this page. Thanks! Code In Peace