Skip to content

Instantly share code, notes, and snippets.

@jessicamilene
Last active November 15, 2021 14:42
Show Gist options
  • Save jessicamilene/0203f153be10ad41ad5aac09c5c9a9ea to your computer and use it in GitHub Desktop.
Save jessicamilene/0203f153be10ad41ad5aac09c5c9a9ea to your computer and use it in GitHub Desktop.
Adding an existing project to GitHub (command line)

Git

How to add your local code to a git repository?

  1. Create a repository on GitHub and save the HTTPS for later
  2. Open a command line on the root folder of your project
  3. Init a local repository git init
  4. Stage all the files git add .
  5. Commit git commit -m "First commit"
  6. Associate the Gii repository git remote add origin [YOUR_REPO_URL]
  7. Check remote connection git remote -v
  8. Push all to the remote repository git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment