Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save banhaclong20/cbb807cef742bff3fc200620ae6ed5b3 to your computer and use it in GitHub Desktop.
Save banhaclong20/cbb807cef742bff3fc200620ae6ed5b3 to your computer and use it in GitHub Desktop.
Adding an existing project to GitHub using the command line
1. Create a new repository on GitHub.
2. In Terminal, change the current working directory to your local project.
git init
git add .
or:
git add --all
git commit -m 'First commit'
git remote add origin <remote repository URL>
Sets the new remote:
git remote -v origin
Push the changes in your local repository to GitHub.
git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment