Last active
June 25, 2016 06:23
-
-
Save ganeshchand/bab0cffcbe9b006c4a143014e02db1c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you have already a git repository in your computer, login to github, create a repository. It should give you a link to remote origin. | |
adding an existing repo to remote repository: | |
You need to decide whether to use ssh or https. If you use https, you get prompted for github userid/password everytime you push. | |
So, using ssh is preferred. | |
Follow these steps if you haven't added SSH key of the computer you are working with into your github account. | |
`` | |
ssh-keygen -t rsa -b 4096 -C "your email adddress" | |
ssh-add ~/.ssh/id_rsa | |
pbcopy < ~/.ssh/id_rsa.pub // this copies SSH key to clipboard | |
`` | |
Now, go to your github account-> SSH and GPG keys-> New SSH Key | |
Enter the name | |
and Command+v to paste the keys | |
Add SSH key | |
Return to the terminal and push your master branch | |
`git push -u origin master` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment