Hi @Crammers, hope you are well!
I have changed my username to @DataMower. Suits better to the world of bits and bytes and Data Science :-)
I have read your instructions concerning your GitHub-workflow and still have a question. Suppose I have written a little python program (program.py). When I want to move it to GitHub, do I have to
Let's consider a second case: let's assume I have a folder where I store all the exercise files of a python text book I have, we call it textbook folder. This folder has program1.py, program2.py, etc. Do I have to create one single .gitignore file for this textbook folder? Or do I have to create a subfolder for each exercise and put a .gitignore file in each? Maybe you can help me...:-) I am still struggling with the first steps, it's pretty tough! Thanks!
Hey @DataMower! Good handle :)
Alright, so the first option:
Suppose I have written a little python program (program.py). When I want to move it to GitHub, do I have to
- put it into a folder first on my local machine, add a .gitignore and then move this folder as a repository to GitHub?
If you have no repository already in github where this will live, and you are making a new one then yes, you could do this.
You dont have to make a gitignore though, in this case if all you had was one repo with nothing else but a few .py files it would be fine. Its encoraged to use .gitignore so you dont accidently upload unessasary things (logs, env files or package folders like node_module), and if you were to share your repo publicly, others also then dont have to add one should they need it.
- move the single file to GitHub as a repository?
A file cant exist as a repository, think of them simply as folders, you dont need to put it in a folder on your local machine but in github it needs to live in a repo or as a Gist (basically stand alone files and snippets - another topic another time 😀 )
Let's consider a second case: let's assume I have a folder where I store all the exercise files of a python text book I have, we call it textbook folder. This folder has program1.py, program2.py, etc. Do I have to create one single .gitignore file for this textbook folder? Or do I have to create a subfolder for each exercise and put a .gitignore file in each?
Yes you would only need to create 1 gitignore and the the py files can be in subfolders or not, however you would normally organsie your code.
Only make one repository for each self contained application/project - so the Textbook would be one repo and all the code, notes, doc relating to that live in that repo. Other than that the organisation of what goes in it it pretty much up to you. Have a look at how others do it if youre unsure. Many have the main repo folder that contains a readme, maybe then the main file and a gitignore, then a few folders that usually contain all the main workings. others might have all the main working in the root of the repo.
Hope that helps! good luck
edit: fixed typo :)
Heyyy @Crammers , thanks a lot for your advice, really appreciate it!
That is much clearer now. Gives me a lot of motivation to start uploading some projecs :-)
By the way: I checked your weather icon repository. In case I work on weather data one day, I might come back to your repository to get some funny icons that I can integrate in my jupyter notebook :-)
Awesome @DataMower thanks! those were my first go at making SVG's so feel free to use or even update them!
Im glad that I was able to help, feel free to reach out should you need any further assist :)