How to push code (file/folder) from local to GitHub repository from scratch

preview_player
Показать описание
Hi its me Tarique Akhtar Ansari by profession I am a mean stack developer
In this video I am going to show you how to push code from local to GitHub repository I will show you step by step
step 1.

download and install git bash into your local computer according to your operating system

you can download from official website


once you have installed git then Open Git Bash.

Now



step 2. is generate ssh-key, this is used for authentication

------------------------------------------------------------

This will Generate public/private rsa key pair.

"Enter a file in which to save the key," press Enter. This accepts the default file location.

Enter passphrase (empty for no passphrase): I will recommend enter here something and also remember that then enter again

Ensure the ssh-agent is running: -- eval $(ssh-agent -s)

Now Add your SSH private key to the ssh-agent. --for adding run command $ ssh-add ~/.ssh/id_rsa

Now you have to add public SSH key to your GitHub account



Now go to your github account click on your profile icon then go to settings click on SSH and GPG key then click on new SSH-key

give a title any thing you like then paste your key here control v then click on "add ssh key" then it will ask for one time password

confirm password, so we have added key successfully

Till now whatever I have done you have to do only once for your system



step 3. Now create a new repository,

-----------------------------------

choose repository name

Now you have to choose either public or private I am leaving it with default public option

Now leave this screen as it is and go to your local directory where your code is,

open git bash in the same directory

Now initialize git -- git init

then git add . --- it will add all the file into stash ignore warning

then git commit -m "first commit" now it will commit all the changes locally

now we are ready to push our code enter commad ---- git push origin master

now go to your repository and referesh now you can see all the files and folder here



Thank you guyz for watching this video don't forget to like share and subscribe my channel
Рекомендации по теме
Комментарии
Автор

Bestest Explanation so far! Successssfully created repository!

wanderlustsiddhi
Автор

Thanks for the step by step explanation. Useful!

rohinikoul
Автор

Thanks bro.. i searched many videos ..but this is really useful one ..

alphonseinbaraj
Автор

Best git video I have seen on video ; I liked and subscribed your channel

taukeerahmad
Автор

thank you so much for this useful tutotial

xarman
Автор

Thanks a lot for this.I saw many videos but i could not do it.But you do it very easity.Thanks a lot.Many many thanks to you ❤❤

fahadibnatuhinofficial
Автор

thanku sir, first video which was usefull

sujaykumar
Автор

thanks bro you really helped me alot and i have solved that issue

navdeepbains
Автор

thank you for saving my day, appreciate your help

enliventechpro
Автор

Thanks for sharing this, very helpful!

yaseminsucu
Автор

Thank you bhaiya
I was very very helpful for me
Thanks

srjdmusic
Автор

wow.you really helped me.Thanks alot alot alot💯👍👍

ahmedshiiqaaye
Автор

Thanks for the help
This video is perfect

rainbhai
Автор

Thank u much it really helped me u explained very easily that too step by step

vihithaguntupalli