Answers for "connect to repo github"

45

set up git repository

# New local repository
git init
git add .
git commit -m "Initial commit"

# New remote repository
# Create remote repository (likely on github), then:
git remote add origin https://github.com/username/new_repo #https
git remote add origin [email protected]:username/new_repo #ssh
# Now push
git push -u origin master
Posted by: Guest on March-05-2020
2

connect to github repository from terminal

to connect your repository from your terminal to your github requires you
1) Create a github repository than
2) Open Terminal
3) You will initilize git and make a branch with: git init -b main
3) Followed by the command: git add . - this adds all your edited work.
4) Followed by a Commit Command: git commit -m "this is my work" - used for 
merging
5) At the top of your GitHub repository's Quick Setup page, click  to
copy the remote repository URL.
6) In terminal add the repository URL where your local repository will be
pushed to: git remote add origin  <REMOTE_URL> - sets the new remote
7) git remote -v -Verifies the new remote URL
8) Push Changes in local Repository to GitHub: git push -u origin main -
Pushes the changes in your local repository up to the remote repository 
you specified as the origin
Posted by: Guest on March-19-2021
-3

how to link a repo to a project on github

$ git init
Posted by: Guest on December-10-2019

Code answers related to "connect to repo github"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language