How to push your Jupyter notebook file from your local computer to Github
Thanks for this time taken to read through my blog post on uploading files/ folder from your local computer to your github account, I tried to make the title as short as possible but that was the shortest title I could come up with (LOL). I have been really wanting to begin building my portfolio on github, so my works can be easily accessed by recruiters during applications and with fellows for further collaboration on projects.
This is so personal to me because I tried understanding it on my own downloaded several unhelpful videos and even took a course on it from udacity, but I still didn't get what I needed,and I think there are people with this same struggle on how they could upload their files on github to build a portfolio as a programmer, I'm here to walk you through the process plus my blog is created to take you my wonderful reader through my process of becoming an Data engineer which will soon be a reality. smiles...
Let's dive right in...
next, create a folder in the windows section of your PC. I created mine and named it git, as seen in the image above.
Github is a resource which is really needed for every programmer out there, as it is an open- source software that allows you share your project with other developers, learn from others project and collaborate with others on a project check the new changes, progress and improvement without compromising the integrity of the original version which is possible due to the Version Control System incorporated.
Now that we know the essence of Github as a Machine Learning engineer or a developer, I would like you to create an account (signup on Github). Afterwards, I will want you to download git on you local computer (download Git).
Now, it assume you have created your github account and installed git on your local computer.
Next,
On your computer search for Git Bash I prefer using the git bash to the command prompt because I'm able to know the directory I'm currently working in. Once your bash opens you have this display on your screen
yours might a dark interface, that doesn't matter mine is white because I prefer the white display to the dark one.
Create a new Respository
For this step, go to your github account you have just created and login, your will see from your profile above at the right of the screen a (+) icon, click on the icon and select new repository.
PS: I named my repository 'Test'
Now go to your git on your local computer, search for git bash
On bash type in cd to change the directory, then type in cd /c (there is a space after cd) if you don't add the space you will get a feedback of no directory found.
/c : tells git the location you have your folder or file stored in your local computer
next, create a folder in the windows section of your PC. I created mine and named it git, as seen in the image above.
Type in
$ ls
To check for the list of folders in your current directory to be sure the folder you just created is listed, from the image below, you observe that the git folder we created is being listed.
then, cd git/ to go into the git folder we have created
NB: You can name your folder anything, I just preferred using git in this instance.
Configure your git account with your git, so they will be in sync.
To set up your email and username on git, you have to use the username and email used in creating your github account.
type in this code on your git bash;
$ git config --global user.name "Your username"
next;
$ git config --global user.email "Your email address"
Clone the repository
In this step you copy the url created from the repository on git hub
,
$ git clone https://github.com/ogemelody/Test.git
when you check your git folder on you local computer you will see the Test folder, remember that's the name I gave my repository.
now that you are sure your folder is in the right location on your local computer, you can add files you will want to upload to your github account.
I will be adding a new folder called DSN AI Bootcamp Qualification Hackathon the folder contains all the notebooks I created and the submissions made during the hackathon, you can decide to add a file only, remember you are adding it into the Test folder.
move over to the git bash, ensure you are in the test directory, by typing in
$ cd Test/
then type in
$ ls
ls - will list the folders and files that are present in the test folder, ensure it add the newly add file or folder you created. In this instance we are adding a folder
we will need to add this new folder to git
$ git add 'DSN AI Bootcamp Qualification Hackathon'/
first we need to commit
$ git commit -m "Committed Message" file /folder name
from the image above you will see the command to commit and the result given
Lastly, to transfer the folder / file to github after you have carefully followed the steps above, there is a command callled 'git push'
$ git push -u origin master
after you have log in your details (username and password), your file/ folder will be uploaded into your github account. After which you will go to your browser and refresh the page to see the recently added folder/ files.
I hope this blog was helpful and informative on how to upload your folder/ files from your local computer to github. thanks for reading through in spite the lengthiness.
Please Share. Like. Comment.💗
This will really encourage me in sharing more helpful contents, as I learn and become better.
very nice, keep it up
ReplyDeleteWell detailed.
ReplyDeleteKudos for putting up this great piece.
ReplyDeleteIt's easy enough for a beginner to pick up. Thanks for sharing
ReplyDeleteSo good, Thank you.
ReplyDeleteWow , very nice , simple and easy to understand.
ReplyDeletePhenomenal stuff
ReplyDeleteNice 👍
ReplyDeleteGreat, very creative thinking
ReplyDeleteBrilliantly put together. Kudos Melody.
ReplyDeleteAwesome
ReplyDeleteWell done melody. This is brilliant and quite easy step-by-step process for a beginner like us. Thanks for posting!
ReplyDeleteDetailed and easy to understand. Thanks for sharing
ReplyDeleteNice work.
ReplyDelete