How do I push code from projects that I had completed on Codecademy to my GitHub account?

I want to push the code of the projects that I completed on the Codecademy platform to my git hub repository.how do I do that. please explain the process.

You would need to have saved the code for your projects in your computer. If it’s complete however, you can simply upload it (unless I’m missing something). If you start a new project you need to have a git repo in your comp linked to your github and use the git push command whenever you want to push.

2 Likes

No other way directly pushing from codecademy platform to github?

Nope, not able to push directly from the platform. If you want to push these up there’s a Git course available on Codecademy or I can summarise here for you (some knowledge is assumed):

  • Create a folder on your local machine for your project
  • Using some editor e.g. Visual Studio Code, copy paste the work done in and save in that folder you created
  • In a terminal, navigate to the folder and enter in git init This will initialise the folder as a git folder
  • In Github, create a new repository and get the repo url (either https or ssh)
  • Back in the terminal enter in git remote add origin <repoUrl>
  • Add the files to be committed with git add .
  • Commit a message with git commit -m "insert some message"
  • Then push to your repo with git push origin master

Edit: A more lightweight version to create a gist and then use the share button at the top of the codecademy screen

4 Likes