Steps to connect to a git repo
- Create the repo on Github
- Create a folder on your local device that you want to old the repo
- git clone {repo_url_from_github}
- git remote set-url origin {repo_url_from_github}
- git config –global user.name “name"
- git config –global user.email “email”
- git branch newbranch
- git checkout newbranch
- make changes to code
- git add .
- git commit . -m “commit message”
- git push origin main
- Go to github and create a new pull request
Steps to start a repo on local and push to github
Various git commands
- git pull origin main ==> pulls from the main branch to local checked out branch
- git remote add {alias} {url} -> git remote add origin github.com/url