Reputation: 1
I am trying to copy and paste my code from a web server which was written in python into a new file on GitHub.
I go to my github repository (https://github.com/markus24135/ibmdatascience) and click "add file" then "create new file". Once a new file opens, I paste the code directly in there. However, the code doesn't become color coded as I would see in python (like import doesn't turn green) and when I save the file and then click on it again, I get this error message: "Sorry, something went wrong. Reload?".
Even when I reload I can't get the code to show up. I thought you could just copy and paste code into github instead of pushing it from python to github? Do I have to figure out how to push it?
Thanks! Mark
Upvotes: 0
Views: 1084
Reputation: 34677
I've never used the "add file" feature, what I do to get code into github is:
git init
git remote add origin [email protected]:markus24135/ibmdatascience.git
git add -A
git push origin -u main
Upvotes: 2