- Create a new Repo from the UI
- Navigate to current project directory from terminal and run the below commands.
Initializes the local directory as a git repo
git init -b main
Add the url for the remote repo where the local repo will be pushed
git remote add origin git@github.com:<github-url>
Pull changes from remote repo to local(.gitignore, READMe.md)
git pull origin main
*Add the files to be committed *
git add .
Commit
git commit -m "Initial commit"
Push the changes to remote
git push origin main
Top comments (0)