#Programming #Python #GitHub #Coding #BeginnerProgramming
🤓 Don’t call me stupid.. but, how do you code in GitHub?
So you want to learn how to code in Python and you’ve heard about GitHub. Don’t worry, you’re not alone. Many beginners have questions about how to get started with coding in GitHub. In this article, we’ll break down the process for you in a simple and easy-to-understand way.
## What is GitHub?
GitHub is a platform used by developers to store, manage, and collaborate on code. It is especially popular in the open-source community, where developers can work together on projects and contribute code.
### Why should you code in GitHub?
– Version control: GitHub allows you to track changes to your code and revert back to previous versions if needed.
– Collaboration: You can work with other developers on projects, making it easier to share code and work together on projects.
– Portfolio: GitHub can serve as a portfolio of your work, showcasing your coding skills to potential employers or clients.
## Getting started with coding in GitHub
### Step 1: Sign up for a GitHub account
– Go to GitHub’s website
– Click on “Sign up” and follow the prompts to create an account
– Choose a username and set up your profile
### Step 2: Create a new repository
– Click on the “+” sign in the top right corner of your dashboard
– Select “New repository”
– Name your repository and add a description
– Choose whether to make it public or private
### Step 3: Clone the repository to your local machine
– Click on the green “Code” button and copy the URL
– Open your terminal and use the command `git clone
### Step 4: Create a new branch
– Before making changes to the code, create a new branch to work on
– Use the command `git checkout -b
### Step 5: Make changes to the code
– Open the code in your preferred text editor and make your changes
– Save the changes and commit them using the command `git commit -m “Your message”`
### Step 6: Push changes to GitHub
– Once you’re happy with your changes, push them to GitHub using the command `git push origin
### Step 7: Create a pull request
– Go to your GitHub repository and click on the “Pull requests” tab
– Click on “New pull request” and select the branch you want to merge
– Add a title and description for your pull request and click “Create pull request”
### Step 8: Merge the pull request
– If your changes are approved, you can merge the pull request into the main branch
– Click on “Merge pull request” and confirm the merge
## Conclusion
Coding in GitHub may seem daunting at first, but with practice and patience, you’ll soon get the hang of it. Remember to take advantage of GitHub’s collaboration features and build a portfolio of your work. Happy coding! 🚀
By following these steps, you’ll be well on your way to coding in GitHub like a pro. Don’t be afraid to ask questions and seek help from the community if you get stuck. With practice and persistence, you’ll soon be comfortable coding in GitHub and contributing to projects with confidence. Good luck on your coding journey!
Nope!
GitHub is a place where you store the code you wrote, explore other people’s code, and collaborate. But you don’t type the code there and you don’t run it there.
If you want to try writing some Python, there are a few websites where you can get started now, no install needed:
[https://www.online-python.com/](https://www.online-python.com/)
[https://replit.com/languages/python3](https://replit.com/languages/python3)
[https://www.onlinegdb.com/online_python_compiler](https://www.onlinegdb.com/online_python_compiler)
Those are great for small programs, like simple exercises.
However, for the full experience you’ll want to download and install Python. I also highly recommend downloading VS Code, an integrated development environment (IDE) where you can write code, run it, and do many of your development tasks.
Actually you can, using GitHub codespaces.
* https://github.com/features/codespaces
However I wouldn’t suggest you start there,
Instead install Python locally and grab an editor, then run your program.
Github Codespaces. Go to any repo and just press “.”.
Yeah. there’s multiple ways to do this. You can code on anything. It’s just fancy typing.
No one who’s learning codes on github, some people use github spaces I guess but I don’t, it’s just a place to upload code with something called git which is a way to keep track of code changes and work collaboratively on code but you write the actual file somewhere else, you download the git repository then you change it in your own computer on visual studio code or something then you upload your changes to github.
No. Actually yes, but no.
You can but you shouldn’t. Just install Python on your PC or Mac.
There are no stupid questions! Yes, use Codespaces. It feels like magic for the timers, and you can easily have your first steps in it. If only I had that 20 years ago. Or, even better just use Google Colab notebooks to learn in them.
You can, there’s an online editor you can access, probably based on the Monaco editor like vscode et al., but you’d probably be better served by running your text editor or IDE locally if you can. You can install add-ons/plugins and properly configure your dev environment that way. I imagine you are limited in what you can configure and/or add in the web editor. IMO it’s for one line changes when you can’t or don’t want to do a full check out right now.
Technically you can, but as mentioned, please save yourself the pain
Everyone here telling you you shouldn’t, yet the entirety of Harvard’s CS50 not only can be completed using only GitHub hosting a VSCode instance, it was designed to be completed using only the GitHub instance.
Yes you can. Yes it’s feasible. You can even get a reputable college certification while doing so.
https://github.com/cs50/cs50.readthedocs.io/blob/main/cs50.dev.md
I use github to share code. As others said you can also use spaces. I’d suggest downloading python directly as others said, or downloading Anaconda and install Python within that. While you could use RStudio to do python as well, it’s not my favorite environment. Lastly, if you just want to type code, you could always use Notepad++ if on windows.
Check out Gitpod
Edit:
https://code.visualstudio.com/docs/python/python-web
He who asks is a fool for five minutes, but he who does not ask remains a fool forever.
Mark Twain
You can code using Python in Google Colab and push to Github, there’s a ton of Python data science tutorials that do this or pretty similar workflow
Yes but it’s a relatively new feature and I wouldn’t recommend it.
Apparently you can, but there are some really good python IDE’s out there like Pycharm. You’ll be more experienced if you try to code in GitHub, but quickly realize that a streamlined IDE is a much better tool.
some ppl are saying install on your local machine but if you’re totally new, that can be difficult in itself. find beginner tutorials on YouTube or head to an online resource like [practicepython.org](http://practicepython.org)
If installing locally is not an option, an online environment can be very useful. I used replit for quite some time for this reason, it’s great to have an environment accessible with just a web browser.
I don’t know about github codespaces, maybe it’s good.
If you have the possibility, installing locally may be better, but honestly I don’t think it matters at the beginning, use whatever is easiest to use. you’ll want to learn to set up an environment at some point though.
(practically) no
This is technically possible… I wouldn’t recommend it… please don’t…
I’m surprised nobody mentioned pythonanywhere.com for a great online experience. Though it’s possible there was some weird / annoying config related to it that I can’t remember.. been so long since I’ve used it.
I will say I’m with everyone else in getting things figured out locally, since honestly a big part of being a developer is dealing with the setup / configuration. Probably wrestle more with that than with actual code some days..
Yes but why?
Hello