When to go to the remote repository
- If there is more than one contributor
- If you don’t trust your machine disk, it may get crashed anytime
- Exchange the code change between the servers for writing the code in IDE in the dev machine, for deploy in the production server
With the git init local, we are done with creating the local repository, now we’ll create a remote repository in git host providers.
- Create the github account
- Create the repository
You have come here, hopefully you already have the account. These are very basic steps to create any "Generic Social Network Account Creation".
- Goto Dashboard github.com
- Click on the New button on the left pan
- Fill in the details required
- name of your choice
- description about the repo
- public - if you want to opensource it.
- private if you have a application logic which you can't opensource.
- Ignore other options
- Now you are in the instructions page, where you can get the 3 options to push your code to the created repo
- Go back to the git init and use the option commands from the above picture.
- create a new repository on the command line
echo "# test-repo" >> README.md git add . git commit -m "first commit" git branch -M main # Change your repo url git remote add origin git@github.com:JinnaBalu/test-repo.git git push -u origin main
Note: While executing the above command you need to be aware of the
https
orgit
URL for pushing the changes. Initially use thehttps
url only. If you still face issues generate-ssh-key