Skip to content

Instantly share code, notes, and snippets.

@hatamiarash7
Last active December 19, 2023 23:52
Show Gist options
  • Save hatamiarash7/c5a975f9b03edc71da878b835ec5e4dd to your computer and use it in GitHub Desktop.
Save hatamiarash7/c5a975f9b03edc71da878b835ec5e4dd to your computer and use it in GitHub Desktop.
Make Git Repository From Existing Directory
  • Create Repository in github.com
  • Go into the directory containing the project.
  • Type git init
  • Type git add . to add all of the relevant files.
  • Type git commit
  • Type git remote add origin https://github.com/<username>/<repo-name>
  • Type git config --global push.default simple
  • Type git branch --set-upstream-to=origin/master
  • Type git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment