Allison
Allison

Reputation: 31

Need help w/ formatting on github

I'm new to programming and starting to put some of my projects into github so that I have something to show employers. I copied and pasted code from one of my first projects I did last summer, but when looking at the page (https://github.com/allisonecrenshaw/world_cup_cosc1336), all the comment sections from my code (# symbol since this one was written in my class that used Python) have giant writing. I'm guessing that usign # in github is for titles rather than comments, so I'm a little lost on how I should really be putting my programs into github so that it's formatted in whatever way is standard for the site. Thanks in advance for your help.

Upvotes: 0

Views: 24

Answers (2)

Araldo van de Kraats
Araldo van de Kraats

Reputation: 304

The file is in markdown language. For examples see: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet

In your case use three backticks at the start and end of your code (including the comments).

So:

```
# comment
some code
```

Upvotes: 1

whiterook6
whiterook6

Reputation: 3534

Any file named README.md will be interpreted as a Markdown file in github (and many other source code viewers.) Rename the file to have a python extension (and possibly create a new README.md file with explanations) and it should solve the problem.

Upvotes: 0

Related Questions