In the previous post we created a local git repository, in this post we are going to create a remote repository in github and link it to the local repository that we created.
Here are the steps to create a new repository in github:
1. Log into your github account and click on the "New" button next to the text "Repositories"
2. Give the repository a name, I am going to name it "NorthwindCafe"
You can set the repository to be public or private, if you don't have a paid account you can only create public repositories. But if you have a paid account it might be a good idea to work privately first before you share your work with the reset of the world.
3. Accept all the default settings and click "Create repository"
4. When you get to the next page you will have instructions on how to link your local repository to the github repository if you scrolled down.
Since we already have a local repository the above command is what we want.
git remote add origin https://github.com/techjunkiejh/NorthwindCafe.git obviously your URL will look different than mine because it would be your github's username and not mine.
5. Now open up the command line in your local repository and type in the command like the instruction says, if you run the command and then type git remote -v you will see that you can now fetch and push code to the repository
6. We are not done yet, now we have to push the code from our local repository with this command git push -u origin master which basically means push the code from master (local) to origin (remote). If you get prompted, type in your github credentials
7. Now if we check online in github we will see the contents of our local repository in github
Previous: git & github: Create a Local NorthwindCafe git Repository
Here are the steps to create a new repository in github:
1. Log into your github account and click on the "New" button next to the text "Repositories"
2. Give the repository a name, I am going to name it "NorthwindCafe"
You can set the repository to be public or private, if you don't have a paid account you can only create public repositories. But if you have a paid account it might be a good idea to work privately first before you share your work with the reset of the world.
3. Accept all the default settings and click "Create repository"
4. When you get to the next page you will have instructions on how to link your local repository to the github repository if you scrolled down.
Since we already have a local repository the above command is what we want.
git remote add origin https://github.com/techjunkiejh/NorthwindCafe.git obviously your URL will look different than mine because it would be your github's username and not mine.
5. Now open up the command line in your local repository and type in the command like the instruction says, if you run the command and then type git remote -v you will see that you can now fetch and push code to the repository
6. We are not done yet, now we have to push the code from our local repository with this command git push -u origin master which basically means push the code from master (local) to origin (remote). If you get prompted, type in your github credentials
7. Now if we check online in github we will see the contents of our local repository in github
Previous: git & github: Create a Local NorthwindCafe git Repository
Really nice post. Thank you for sharing amazing information.
ReplyDeleteJava Training in Credo Systemz/Java Training in Chennai Credo Systemz/Java Training in Chennai/Java Training in Chennai with Placements/Java Training in Velachery/Java Training in OMR/Java Training Institute in Chennai/Java Training Center in Chennai/Java Training in Chennai fees/Best Java Training in Chennai/Best Java Training in Chennai with Placements/Best Java Training Institute in Chennai/Best Java Training Institute near me/Best Java Training in Velachery/Best Java Training in OMR/Best Java Training in India/Best Online Java Training in India/Best Java Training with Placement in Chennai