How to Push Anything to GitHub using Git Bash?
For a beginner, it is a very hectic task to make a GitHub repository and push anything on GitHub, for this we all have seen a lot of videos but it is very time-consuming. So in this article, we are going to see how you can push whatever you want to push on GitHub.
So let’s start.
Prerequisite: Must have a GitHub account and git bash installed.
Step By Step Implementation:-
Make a GitHub repository by clicking on the “new“ Button
Now after clicking on that, you will see a screen something like as shown below in the image.
Give the name of your repository and give a short description of your repository.
After that just click on the “create repository “ option.
After that GitBash will open and now you have to make a clone of the repository that we have just made. We can make the clone by simply writing the command “git clone https://link”. This HTTPS link we will get from our repository.
After opening Git bash First execute these 5 commands:-
- git init
- git add README.md- git commit -m "first commit"- git branch -M main- git remote add origin https://github.com/jpowarpgithub/temp.git
How to get this https:// link??
Just go to your repository and there is an option name “Code” Just click on that and how you are able to see the https:// link so just copy that.
Now we are having the link to go back to the GitBash terminal and type “git clone https://link” and hit enter.
- git push -u origin main








0 Comments