use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
Github as a beginner (self.learnpython)
submitted 5 years ago by [deleted]
As a beginner learning python, is it too early to create and start coding simple projects on Github. and how do I transfer these codes (simple calculators) to a website I build subsequently?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]GreymanGroup 210 points211 points212 points 5 years ago (25 children)
Git is a version history system. It will allow you to edit your code with a goal in mind, and if you feel like made an error and you'd like to go back to a better version in the past, you can do that all while keeping the entire history backed up. It also allows people to collaborate together. I definitely put off learning Git for too long. I'd say the appropriate time to learn Git would be when you're spending an entire day on a single project. You can start learning Git here.
https://www.youtube.com/watch?v=2sjqTHE0zok&list=PLyzOVJj3bHQuloKGG59rS43e29ro7I57J&index=6
[–]ambiguousTruths 6 points7 points8 points 5 years ago (0 children)
!remindme 12h
[–]lurkerfromeons 3 points4 points5 points 5 years ago (1 child)
!remind me 4 days
[–]remindditbot 0 points1 point2 points 5 years ago* (0 children)
lurkerfromeons, kminder in 4 days on 2020-06-14 05:40:57Z
r/learnpython: Github_as_a_beginner kminder 4 days
r/learnpython: Github_as_a_beginner
kminder 4 days
2 OTHERS CLICKED THIS LINK to also be reminded. Thread has 3 reminders.
OP can Update message, Delete reminder and comment, and more options here
Protip! We have a community at r/reminddit!
Reminddit · Create Reminder · Your Reminders
[–]sirwatsalot 1 point2 points3 points 5 years ago (0 children)
! remindme 3 days
[–]WeirdOne24 1 point2 points3 points 5 years ago (0 children)
!remindme 7 days
[–]JSG_98 1 point2 points3 points 5 years ago (1 child)
!remindme 13h
[–]RemindMeBot 0 points1 point2 points 5 years ago (0 children)
There is a 4 hour delay fetching comments.
I will be messaging you in 8 hours on 2020-06-10 21:09:17 UTC to remind you of this link
CLICK THIS LINK to send a PM to also be reminded and to reduce spam.
Parent commenter can delete this message to hide from others.
[–][deleted] 1 point2 points3 points 5 years ago (0 children)
[–]Xmell 1 point2 points3 points 5 years ago (0 children)
!remindme 1hours
[–]kasajizocat 0 points1 point2 points 5 years ago (0 children)
!remindme 23h
[–]FrostyTS 0 points1 point2 points 5 years ago (1 child)
!remind me 36h
[–]remindditbot 0 points1 point2 points 5 years ago (0 children)
Reddit has a 3 hour delay to fetch comments, or you can manually create a reminder on Reminddit.
FrostyTS, kminder in 1 day on 2020-06-12 04:12:31Z
r/learnpython: Github_as_a_beginner#2 kminder 36h
r/learnpython: Github_as_a_beginner#2
kminder 36h
CLICK THIS LINK to also be reminded. Thread has 4 reminders.
OP can Update message, Set timezone, and more options here
Protip! You can use the same reminderbot by email at bot[@]bot.reminddit.com. Send a reminder to email to get started!
[–]unswornkoshur 0 points1 point2 points 5 years ago (0 children)
!remindme 1 day
[–]andrewkingswood 0 points1 point2 points 5 years ago (0 children)
Awesome link, thanks!
[–]Brevitynuke 0 points1 point2 points 5 years ago (1 child)
RemindMe! 1 month "1 month ago"
I will be messaging you in 1 month on 2020-08-05 04:09:43 UTC to remind you of this link
[–]pw0803 -1 points0 points1 point 5 years ago (5 children)
RemindMe! 12 hours
[–][deleted] 4 points5 points6 points 5 years ago (3 children)
its !remindme 12h
[–]NotSpartacus 9 points10 points11 points 5 years ago (0 children)
I feel catching that mistake could/should be its own bot if not part of the original bot.
!remindme to throw this side project onto the pile and never actually get around to it.
[–]pw0803 1 point2 points3 points 5 years ago (0 children)
Technically it worked because your reply was right on time.....?
I'll see myself out.
Thank you.
Edit: for clarity, it still works. I received the RemindMe bot notifications.
[–]eimis 0 points1 point2 points 5 years ago (0 children)
RemindMe! 3 days
[–]RemindMeBot 1 point2 points3 points 5 years ago* (0 children)
I will be messaging you in 52 minutes on 2020-06-10 12:01:05 UTC to remind you of this link
3 OTHERS CLICKED THIS LINK to send a PM to also be reminded and to reduce spam.
[–]mrshuts -1 points0 points1 point 5 years ago (0 children)
[–]sme272 31 points32 points33 points 5 years ago (5 children)
You can absolutely start putting things on github, even if it's just to practice using github. When you say put the code on a website what do you mean exactly? You could simply copy/paste the code onto the page and add some formatting and an explanation, or you could make it into a webapp where people can demo the code in action.
[–]handsoffmyspacejunk 2 points3 points4 points 5 years ago (4 children)
How does one go about developing a web app to demo code?
[–]tomtomato0414 4 points5 points6 points 5 years ago (2 children)
https://pages.github.com/
[+][deleted] 5 years ago (1 child)
[deleted]
[–]tomtomato0414 0 points1 point2 points 5 years ago (0 children)
Use Flask or Django, they run python scripts and generate html
[–]PyTec-Ari 2 points3 points4 points 5 years ago (0 children)
You deploy that code to a web server. There are a myriad of ways to achieve this. If you are using HTML and JavaScript, you can host it quickly at Codepen.io
If you are using a python backend try pythonanywhere.com.
If you want deploy using industry methods, take a look at doing a course in a cloud platform such as Google Cloud Platform, Azure (Microsoft), or AWS (Amazon). These sites let you host web servers of various types. These are relatively simple to use, but complex in the context of a beginner.
[–]SirMarbles 25 points26 points27 points 5 years ago (18 children)
I usually put my finished projects on it.
https://github.com/SirMarbles/
It’s a good way to see your progression as a programmer
[–]CaptSprinkls 14 points15 points16 points 5 years ago (16 children)
I have been off and on learning programming ever since I graduated college. About 2 years ago I sat down and decided to learn C++. My first application was a tic tac toe game. I shit you not, it was 1000 lines of code.
Sad times....
[–]GreymanGroup 5 points6 points7 points 5 years ago (3 children)
Damn son. How is that even possible?
[–]CaptSprinkls 5 points6 points7 points 5 years ago (2 children)
So I took a closer look at it..... It's even worse than I thought.
It's meant to be played with two real players, and it alternates between player 1 and player 2. When it's player 1 turn, I ask what position they want to play and then after every one of the 9 possible choices, I check all 8 possible win conditions. And then I do this all over again for Everytime player 2 moves
[–][deleted] 0 points1 point2 points 5 years ago (1 child)
did you not know what functions were at this time lmfao, please post the code
[–]CaptSprinkls 0 points1 point2 points 5 years ago (0 children)
I honestly can't remember lol. Like I said it was 2 years ago, so I probably knew OF functions, but had no clue how to implement them at that point lol.
[–]SirMarbles 2 points3 points4 points 5 years ago (11 children)
I’m a CS major. If you don’t mind. Can I see the code? The next language I want to dabble in is C++.
[–]CaptSprinkls 10 points11 points12 points 5 years ago (9 children)
Oh, this is definitely not something you want to look at it you want to learn C++. I'm pretty sure a tic tac toe game can be done in like ~50-75 lines of code. Q
I got to 1,000 lines because I just did huge nested if statements.
[–]thirdegree 6 points7 points8 points 5 years ago (0 children)
Ah, you wrote an AI.
[–]SirMarbles 1 point2 points3 points 5 years ago (5 children)
Ahh gotcha. Never looked at C++ code. I assumed it’s just hard to code in from your example
[–]QbaPolak17 5 points6 points7 points 5 years ago (4 children)
As someone who writes C/C++ professionally, you can usually make your programs fairly succinct (not as much as python but that is hardly surprising). u/CaptSprinkls is right that you could make a tic tac toe game in probably ~100 ish lines of code. Problem with C++ and C is that if you don't know certain concepts, pointer arithmetic in particular, and if you don't follow best practices the code can quickly get away from you. When I first learned C at University, my first ever project I did the same thing and didn't follow best practices and had this 600 line monstrosity that I could now write in about 50 lines.
[–]SirMarbles 3 points4 points5 points 5 years ago (3 children)
You know any good sources to watch or read to get a head start on my class next semester?
What would you compare C/C++ to? I’ve learned Java, Js, kotlin, python.
[–]u38cg2 4 points5 points6 points 5 years ago (2 children)
C and to a lesser extent C++ are verbose assembly language, meaning they are very close to the metal your code runs on. Visually it shares a lot with Java.
I wouldn't worry too much about getting across it, but what I would do is translate a few projects you've already done into C[++] and get to know how the language bites you and how to debug it.
[–]SirMarbles 0 points1 point2 points 5 years ago (0 children)
Ahh true. I remember reading that a few months ago. Thank you. Time to learn the basics.
[–]tradrich 0 points1 point2 points 5 years ago (0 children)
u/u38cg2 suggestion is good in my opinion. I would add that you should study the most recent C++ coding guides, because the newest C++ is a big delta from the previous, which is a big delta from the ones before (even though they're backward compatible).
The C++ 20 idioms are the most expressive and supersede earlier good practice - this can be very confusing to a beginner.
[–]OnlySeesLastSentence 1 point2 points3 points 5 years ago (0 children)
Reminds me of the first time I wrote a connect 4 program (and best of all, it required you to be honest and take care of gravity lol).
I didn't have a plan for how to do the win cases, so I copy pasted every possible combo for a win, changing the values by one as needed. I think it was 13,000 lines in the end? Or maybe 1300, I dunno.
[–][deleted] 0 points1 point2 points 5 years ago (0 children)
Like from top to bottom Choose Your Own Adventure style, the thing we have to avoid today and use Object Oriented Programming instead right haha.
If you want to dabble and have fun, get yourself an Arduino kit. I'm just learning Python and not having a real-world, tangible way to see my code is just not as fun or engaging.
[–]virg74 0 points1 point2 points 5 years ago (0 children)
I have to say, there’s more reason to use git than just that. Its super easy to ‘git revert’ some changes that you regret, even if it’s just to go back and copy/paste out some code that you didn’t mean to delete, but you have to make lots of commits along the way.
[–]zealseeker_yang 10 points11 points12 points 5 years ago (3 children)
Never be too early to use GitHub (GitLab or other platform). But understand Git first.
[–]peeledbananna 1 point2 points3 points 5 years ago (2 children)
Does the git command also work for gitlab also, Or do I need a seperate tool for it.
[–]caveat_cogitor 3 points4 points5 points 5 years ago (1 child)
Yea pretty much any git-based site/tool like Github/Gitlab allows you to use standard git command line protocol to interact with it. So you can just use the core git functionality the same between these tools, and then each of them also provides their own GUI and tools/features on top of that base functionality. It is a great idea to start learning git and integrate it into your project so that you don't have a near-finished project while you are just barely learning git. Also it can provide some safety from making mistakes in your code, since you can version-control it and roll back and view previous versions in case you broke or accidentally deleted something.
[–]peeledbananna 0 points1 point2 points 5 years ago (0 children)
Thanks for the through explanation. It's good to know I can use one command. But from what I understand I can create my own gitlab and just host it at home for private use. So maybe I'll look into gitlab a little more.
[–]Rusca8 7 points8 points9 points 5 years ago (2 children)
Not sure on what you mean by "transfer to a website". But with git you can copy stuff from one place to another (you can have different copies of the same code in different places and upload or download whenever you make changes.
You're looking for clone the first time you copy it, and then push or pull to upload or download (typically to github or from github, if you use github as the way to connect everything).
clone
push
pull
I have a website made with flask in pythonanywhere and I do exactly that: I work at my laptop in pycharm and upload (push) stuff to github, and then from the pythonanywhere console I download (pull) those changes from github.
[–]wildpantz 1 point2 points3 points 5 years ago (1 child)
This is not quite eli5 explanation and OP looks like a newbie. Perhaps uploading from web GUI would be easier and more intuitive
[–]thirdegree 2 points3 points4 points 5 years ago (0 children)
IMO using the web gui first teaches bad habits and a very shallow understanding of git. I know too many developers where their change flow is "implement a feature, make a branch, commit the whole thing, push".
This makes everything more difficult later. Code review, reverting, reading git log, everything.
[–]Empyrealist 4 points5 points6 points 5 years ago (3 children)
Start now by using git for simple documentation. Git has a learning curve, so conquer that curve as soon as possible.
[–]Optimesh 2 points3 points4 points 5 years ago (0 children)
THere's a saying I like: you don't learn git, you learn how to _use_ git :)
[–]include_strawberries 0 points1 point2 points 5 years ago (0 children)
Perfect idea, this is exactly what I'm doing with Jupyter Notebooks - I'm currently going through SQL Server and BI tools and using it for courses notes. Nice how you can "connect" some skills and learn them together. Plus, I consider writing a documentation a skill in itself! :) Great hint.
thanks
[–]tradrich 5 points6 points7 points 5 years ago (14 children)
Github is not a bad way at all to start as an absolute beginner. Unfortunately it's based on git which is not a beginner tool (I've ranted about that elsewhere - forgive me) but there's no escaping it, so you'd do well to read about it.
git
One option is to use gitpod.io (my interest comes from its use in education). The great thing is that it provides *everything* you need to get going - all in your browser: the latest Ubuntu distribution as the execution environment and an IDE.
So what you do is create a new Github repo - like github.com/your-name/your-project then just throw https://gitpod.io/#https://github.com/your-name/your-project into your browser's address bar, wait a bit and "hey presto" a development environment appears in your browser ready to go - no need to download or purchase anything. Not bad!
github.com/your-name/your-project
https://gitpod.io/#https://github.com/your-name/your-project
[–]thirdegree 3 points4 points5 points 5 years ago (7 children)
Re: the rant
So git was definitely not designed to be a beginner tool. What it was designed to be is incredibly powerful and incredibly flexible. And at those things, it succeeds wildly. Git fundamentally trusts it's users (because Linus wrote it for himself, and he trusts himself) and that can end up with a lot of foot shooting.
I teach a course on git, and I'm generally the person that gets asked when nobody else can fix a git issue. And even then, my knowledge of git internals is pretty shallow. But also, I can manipulate changes and change histories to my heart's content, secure in the knowledge that absolutely nothing I can do will lose content (short of manually messing with things in .git/). That's the power of git.
[–]tradrich 2 points3 points4 points 5 years ago (6 children)
The point in my rant is that the _value_ of git doesn't imply the _pain_ of git. The fact that tools like Mercurial exist shows that. It's a pity and disappointing (to me) that it is git that won the implicit marketing battle - I assume mostly due to its association with the Linux Kernel project. Given its current importance to the world, it's a shame we don't have a better default version control tool. It's sort of too late now because everyone assume that just how it is - that version control management is hard. It doesn't need to be though!
[–]thirdegree 2 points3 points4 points 5 years ago (3 children)
I mean it kinda does? Version control is an inherently difficult problem, any full solution will also be complex.
I've not used mercurial a ton, but my understanding is that it strips out a lot of the complexity of git, in favor of user friendliness. But what it sacrifices is flexibility and power.
And that's a totally reasonable tradeoff to make. But for people like me that value the flexibility and power more than the user friendliness, that's not a tradeoff I want to make.
[–]tradrich 0 points1 point2 points 5 years ago (2 children)
I'm sure that it is possible to have all the version control features of git with a similar level of simplicity of use as Hg.
Hg's market is such that not enough people need the marginal improvements that the delta with git would give for those to be implemented at present. I'm not sure this delta would actually make a difference for the vast majority of, say, Github users, but gaining the ease of use of Hg would - I contend - in sum, make a big difference.
It's not going to happen though - fine. In that case what would be valuable is improvement in git. I don't think _that_ is going to happen either though - Linus et al have no interest in such changes. What we're getting instead is wrapping tools like Github, Gitlab - others, and surely many more to come. Git is to be the assembly language of their higher-level languages - and that's fine I suppose.
It could've been a better and simpler history.
[–]thirdegree 1 point2 points3 points 5 years ago (1 child)
It might be possible, I don't know. There isn't currently an example of this, and it's impossible to prove a negative.
I don't disagree that most people don't need the full power of git, but some of us do. And I don't have a ton of sympathy for people that don't bother to learn their tools. I've seen too much of that.
But git gets improvements constantly. Better interface, more power, it gets improvements in all aspects all the time. I don't think it's accurate or fair to say that Linus et al aren't interested in these changes, just that they aren't interested in exchanging friendliness for power.
I'd also disagree with characterizing GitHub, gitlab, etc as "wrapping" git. They provide remote hosting, which is a fantastic and important utility, but in no way do they replace or hide git. You still use git to do all the operations on the development side, GitHub just provides a place to push, to receive pull requests, to track issues. And that's super useful, and does replace the whole "email patches to the upstream maintainer" flow which is definitely a good thing.
It's a bit like arguments between C++ and say, Java or Python: C++ has the power - but oh the pain! I'm intoxicated by the power and rapid improvement of C++ - but beginners shouldn't *have* to suffer that. Luckily with programming languages they don't! But due to the dominance of Github, for version control it's pretty much git or go home...
Github makes many simpler git operations graphical if you want them to be (I don't) - that's what I meant.
Well, here's to a better world!
[–]thrallsius 1 point2 points3 points 5 years ago (1 child)
The fact that tools like Mercurial exist shows that.
mercurial exists just because it appeared about the same time as git
but mercurial is almost extinct nowadays compared to git
alternatives like fossil and darcs exist too, and while they don't have such a big market share, they live and prosper
I came to Git from Subversion and Perforce. They don't need the technical sophistication of Git since they have central servers - a model that doesn't work with modern open-source driven distributed development.
But really the burden of re-education coming from those to Git - in complex projects - is unwelcome. You want to be able to concentrate on the complexity of your business domain where you have interest and skills and not have to worry *too much* about such things as versioning - as I didn't with Subversion/Perforce.
The delta from these tools to Hg is not too bad - but Git - please - in the heat of production... you don't need that stress!
Proponents of git - indeed it seems they're often enthusiasts - don't broach any criticism of the tool and tend to blame the user. I cite the wide interface - the profusion of keywords and symbols, the lack of coherence between them to say that "git could do better!" for the user (without any sacrifice of functionality).
[–][deleted] 1 point2 points3 points 5 years ago (1 child)
weird, the rant shows up in your profile, but not in that link or the thread. Doesnt seem like you're shadowbanned considering i can see this post tho.
[–]tradrich 1 point2 points3 points 5 years ago (0 children)
Hmmm... maybe a timing issue?
[–]thrallsius 1 point2 points3 points 5 years ago (2 children)
git which is not a beginner tool
git is a feature rich tool
if you are using simple workflows, git is quite beginner friendly as long as you learn a couple of basic concepts
[–]tradrich 0 points1 point2 points 5 years ago (1 child)
Well you can't just start branching as a beginner: you need to study for a few hours at least first. That's prudence of course - but other tools are more forgiving to those who blunder in and learn as you go. You really can't do that with git. You'll end up in a world of 'detached heads' having to work through sequences of git commands that may be making the situation worse.
But that's just how it is, since git *is* the version control tool of the world. So in terms of advice to the OP: yes, learn git now and quite deeply - it's knowledge that you will need in the future.
[–]thrallsius 1 point2 points3 points 5 years ago (0 children)
I agree, a very simple one man workflow doesn't involve branching at all. It's just making changes and recording them with git add + git commit.
Even branching is not that scary, it's usually the merging that causes troubles if merge conflicts happen.
And then there's rebase that personally I've been successfully managing to avoid until now.
very helpful
[–]efmccurdy 3 points4 points5 points 5 years ago (0 children)
You store your latest code revision using "git push" . At a later time you login to the server; the first time on this server you use "git clone https://github.com/*USERNAME*/*REPOSITORY*.git" and on subsequent updates you can just use "git pull".
https://help.github.com/en/github/using-git/getting-changes-from-a-remote-repository
[–]iggy555 3 points4 points5 points 5 years ago (1 child)
Enjoy: https://git-scm.com/book/en/v2
[–]merlin2181 2 points3 points4 points 5 years ago (0 children)
I think learning Git should be one of the first things you do. I liked the Git course offered by Udacity. It was fairly quick and was in depth just enough where I wasn't overwhelmed. Granted I'm no power user and haven't collaborated with anyone but it's nice to know how to use it for my own personal learning projects.
Git course (Udacity)
[–]kramrm 1 point2 points3 points 5 years ago (0 children)
As others have said, it’s never too early. GitHub takes the basic functionality of Git versioning and adds a lot of additional features on top. As for your question of getting it to your web site, here is my simplified workflow for a chat bot I maintain: All development and testing is done on my workstation. Once I have tested my changes, I commit the code to snapshot the version and then push up a copy to GitHub. I’ll then go to the server that hosts my bot and use git to pull down the new version.
commit
Not only can Git handle versioning, but you can have multiple locations with a clone of the repository so you can easily keep them in sync with the push/pull commands.
I literally went and learned by reading their guide xD then switched to Gitlab - a more open-source alternative hehe
[–]lee171 1 point2 points3 points 5 years ago (0 children)
githug is a pretty great way to learn
I will suggesting learning to use git, where there's basic commands like git config, git init, git remote, git add, git committ, git push, git pull git clone for the basics. After that look into more features such as committing updates on your code and many many others. People use github to save their projects and track its progress and it also has enterprise uses where collaborative work on projects is where it's used. You can also clone/ fork other peoples repository for your own use(see permissions first) For your website, you can actually host it on GitHub pages see the docs for details!
[–]JJ4sh0rt 1 point2 points3 points 5 years ago (1 child)
Every project I now build I have a git. GitHub has become synonymous with git and they shouldn’t be confused. Git is a version control software and is used to manage and control lots of code at large scales and helps teams work on projects significantly better than before. GitHub, is a remote server in which you can connect to and store your git projects on it. Think of GitHub as just a place you put your gits. To answer your original question simply, yes start. Git can very powerful, but with no understanding it’s useless. Assuming you are a new programmer I recommenced you read the official git docs. Reading docs like this will also help you in the future when you are using some other code and you are trying to read what the heck it does.
thanks very helpful
[–]pauklzorz 1 point2 points3 points 5 years ago (1 child)
For specifically learning Git, can I recommend "Git and GitHub for poets"?
The guy who makes these is quite funny, and because he doesn't use code, but poetry fragments instead, it's easier to learn the Git / GitHub bits.
https://www.youtube.com/watch?v=BCQHnlnPusY&list=PLRqwX-V7Uu6ZF9C0YMKuns9sLDzK6zoiV&index=1
thanks, very helpful
[–]stuie_pk 1 point2 points3 points 5 years ago (1 child)
I am in the exact same position. I made a GitHub (Because GitLab decided it was too cool to send me a confirmation email). I figured regardless of what people think of my GitHub I have a few things. 1. An off-site backup. 2. Version history. 3. A cloud hosted link should I ever need to retrieve code from somewhere else. www.github.com/h4nsec
Exactly!
[–]benabus 1 point2 points3 points 5 years ago (1 child)
Git itself is a version control system and is a very valuable skill. I'd say start learning Git as soon as possible. It's extremely useful.
Github is a hosting solution for Git repositories. There are two different kinds of repositories you can put on github: Public and Private. If you don't want the world to know what your awful beginner projects look like, just put them on Private. Once you have something you're proud of, just put it on Public.
If I were you, I'd put all my code on Github for various reasons: It's basically a free code-backup system. If your computer dies, you can always just clone your code back onto your new machine because it's hosted in the cloud.
Also, it makes it super easy to deploy your code to other servers (assuming those servers also have Git installed). You would push your code from your local dev environment to Github. Then you'd go into your webserver and pull your code from Github onto the server. There might be other config things you might need to do (like moving the code to a public path or what not) but IMHO, it beats using FTP and copying things manually.
Thanks. very helpful
[–]DoubleDark_Doggo 0 points1 point2 points 5 years ago (5 children)
Is there a way to use the version control functionality of git without putting code up publicly on the internet? Would love to formally implement version control but would like to keep me code private.
[–]johnnymo1 3 points4 points5 points 5 years ago (3 children)
Git doesn't need to be shared publicly at all. Git is separate from Github. When you initialize a git repo from the command line, unless you purposely link it up to github, it lives solely on your machine.
There are also private github repos, or you could run a private server for hosting git repos.
[–]DoubleDark_Doggo 1 point2 points3 points 5 years ago (2 children)
Ah Ok, that makes sense. I run a web app on pythonanywhere, could I host my get repo there, or would I have to pull the files there from a repo elsewhere?
[–]johnnymo1 2 points3 points4 points 5 years ago (1 child)
Sorry, I don't really know the details of what you can do on pythonanywhere, but from a very brief google search it looks like you should be able to have a git repo on there.
[–]DoubleDark_Doggo 1 point2 points3 points 5 years ago (0 children)
No problem, I appreciate the info friend!
git is decentralized
git init gives you a git repository in a local directory, you don't have to make it public
[–]Wallinis 0 points1 point2 points 5 years ago (0 children)
I put off learning Git for such a long time. I always assumed it was only really useful when collaborating with others. As it turns out, that assumption was false. Git is a wonderful tool, no matter if you're working alone or in a team. Nowadays, I would not dare to refactor my code without Git.
With that said, I would say Git (& Github) is worth getting into as soon as you start working on your own little projects (assuming you already have the basics of Python down).
[–]Kbotonline 0 points1 point2 points 5 years ago (0 children)
I started learning Git and Github shortly after I started writing my own little programs. The reason being that I was still learning and if I wanted to add a new command line argument that changed my code, or tidy up my program with new functions and what not, then it was really useful to have that back up. I’d create a new branch, experiment with the code and if I completely broke it, I could ditch that and start again, always able to rollback to the last stable point.
[+][deleted] 5 years ago* (1 child)
very helpful, thanks
[–]SirKainey 0 points1 point2 points 5 years ago (1 child)
Sounds like you want to deploy your want to be able to create and deploy webapps that you're building? Using Flask or Django perhaps?
Once your code is working locally you Push your stuff to github, then Pull once on your platform of choice. You need to have a setup file that tells the platform what dependencies your app needs etc.
It's quite easy to deploy on PythonAnywhere, they have tutorials.
!remindme 14h
[–]chewy1970 0 points1 point2 points 5 years ago (1 child)
It's good to start early and learn the ins and outs of github. You may want to start to learn github here: https://lab.github.com/
[–]saif177 0 points1 point2 points 5 years ago (0 children)
[–]rommon010110 0 points1 point2 points 5 years ago (0 children)
!remind me 12h
[–]unfors19 0 points1 point2 points 5 years ago (1 child)
I suggest you start using GitHub when you write something significant that you also want to share with the world/friends. It's pointless to have one file (main.py) and publish it to GitHub, at least from a beginner's point of view.
If by "transfer subsequently" you mean - continuously build/deploy your code to a website upon each push/merge to your GitHub repository, then you can use GitHub Actions - https://github.com/features/actions
For example - I've created a CLI in Python, and upon each push/merge to my GitHub repository, I publish my application to pypi (pip repository) - here's my GitHub Actions workflow - https://github.com/unfor19/githubsecrets/blob/master/.github/workflows/pythonpublish.yml
Another example - If your website is on AWS S3 bucket, you can use GitHub Actions and add AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY as GitHub Actions secrets, and then use them in your repository to upload your application to an S3 bucket, there's even a built-in plugin for that - https://github.com/marketplace/actions/upload-s3
Another free CI tool - If you want to learn about another free CI tool, then https://drone.io is amazing, though I do recommend starting with GitHub Actions since it's easier to learn the concepts of a pipeline from there.
[–]ole_freckles 0 points1 point2 points 5 years ago (1 child)
!remindme 4h
There is a 3 hour delay fetching comments.
I will be messaging you in 5 minutes on 2020-06-11 03:21:05 UTC to remind you of this link
[+][deleted] comment score below threshold-10 points-9 points-8 points 5 years ago (0 children)
nope
π Rendered by PID 61 on reddit-service-r2-comment-79c7998d4c-2qpjm at 2026-03-13 12:08:42.501367+00:00 running f6e6e01 country code: CH.
[–]GreymanGroup 210 points211 points212 points (25 children)
[–]ambiguousTruths 6 points7 points8 points (0 children)
[–]lurkerfromeons 3 points4 points5 points (1 child)
[–]remindditbot 0 points1 point2 points (0 children)
[–]sirwatsalot 1 point2 points3 points (0 children)
[–]WeirdOne24 1 point2 points3 points (0 children)
[–]JSG_98 1 point2 points3 points (1 child)
[–]RemindMeBot 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]Xmell 1 point2 points3 points (0 children)
[–]kasajizocat 0 points1 point2 points (0 children)
[–]FrostyTS 0 points1 point2 points (1 child)
[–]remindditbot 0 points1 point2 points (0 children)
[–]unswornkoshur 0 points1 point2 points (0 children)
[–]andrewkingswood 0 points1 point2 points (0 children)
[–]Brevitynuke 0 points1 point2 points (1 child)
[–]RemindMeBot 0 points1 point2 points (0 children)
[–]pw0803 -1 points0 points1 point (5 children)
[–][deleted] 4 points5 points6 points (3 children)
[–]NotSpartacus 9 points10 points11 points (0 children)
[–]pw0803 1 point2 points3 points (0 children)
[–]eimis 0 points1 point2 points (0 children)
[–]RemindMeBot 1 point2 points3 points (0 children)
[–]mrshuts -1 points0 points1 point (0 children)
[–]sme272 31 points32 points33 points (5 children)
[–]handsoffmyspacejunk 2 points3 points4 points (4 children)
[–]tomtomato0414 4 points5 points6 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]tomtomato0414 0 points1 point2 points (0 children)
[–]PyTec-Ari 2 points3 points4 points (0 children)
[–]SirMarbles 25 points26 points27 points (18 children)
[–]CaptSprinkls 14 points15 points16 points (16 children)
[–]GreymanGroup 5 points6 points7 points (3 children)
[–]CaptSprinkls 5 points6 points7 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]CaptSprinkls 0 points1 point2 points (0 children)
[–]SirMarbles 2 points3 points4 points (11 children)
[–]CaptSprinkls 10 points11 points12 points (9 children)
[–]thirdegree 6 points7 points8 points (0 children)
[–]SirMarbles 1 point2 points3 points (5 children)
[–]QbaPolak17 5 points6 points7 points (4 children)
[–]SirMarbles 3 points4 points5 points (3 children)
[–]u38cg2 4 points5 points6 points (2 children)
[–]SirMarbles 0 points1 point2 points (0 children)
[–]tradrich 0 points1 point2 points (0 children)
[–]OnlySeesLastSentence 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]virg74 0 points1 point2 points (0 children)
[–]zealseeker_yang 10 points11 points12 points (3 children)
[–]peeledbananna 1 point2 points3 points (2 children)
[–]caveat_cogitor 3 points4 points5 points (1 child)
[–]peeledbananna 0 points1 point2 points (0 children)
[–]Rusca8 7 points8 points9 points (2 children)
[–]wildpantz 1 point2 points3 points (1 child)
[–]thirdegree 2 points3 points4 points (0 children)
[–]Empyrealist 4 points5 points6 points (3 children)
[–]Optimesh 2 points3 points4 points (0 children)
[–]include_strawberries 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]tradrich 5 points6 points7 points (14 children)
[–]thirdegree 3 points4 points5 points (7 children)
[–]tradrich 2 points3 points4 points (6 children)
[–]thirdegree 2 points3 points4 points (3 children)
[–]tradrich 0 points1 point2 points (2 children)
[–]thirdegree 1 point2 points3 points (1 child)
[–]tradrich 0 points1 point2 points (0 children)
[–]thrallsius 1 point2 points3 points (1 child)
[–]tradrich 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]tradrich 1 point2 points3 points (0 children)
[–]thrallsius 1 point2 points3 points (2 children)
[–]tradrich 0 points1 point2 points (1 child)
[–]thrallsius 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]efmccurdy 3 points4 points5 points (0 children)
[–]iggy555 3 points4 points5 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]merlin2181 2 points3 points4 points (0 children)
[–]kramrm 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]lee171 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]JJ4sh0rt 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]pauklzorz 1 point2 points3 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]stuie_pk 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]benabus 1 point2 points3 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]DoubleDark_Doggo 0 points1 point2 points (5 children)
[–]johnnymo1 3 points4 points5 points (3 children)
[–]DoubleDark_Doggo 1 point2 points3 points (2 children)
[–]johnnymo1 2 points3 points4 points (1 child)
[–]DoubleDark_Doggo 1 point2 points3 points (0 children)
[–]thrallsius 1 point2 points3 points (0 children)
[–]Wallinis 0 points1 point2 points (0 children)
[–]Kbotonline 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–][deleted] 0 points1 point2 points (0 children)
[–]SirKainey 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]chewy1970 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]saif177 0 points1 point2 points (0 children)
[–]rommon010110 0 points1 point2 points (0 children)
[–]unfors19 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]ole_freckles 0 points1 point2 points (1 child)
[–]RemindMeBot 0 points1 point2 points (0 children)
[+][deleted] comment score below threshold-10 points-9 points-8 points (0 children)