Skip to content

Instantly share code, notes, and snippets.

@trasherdk
Forked from steveclarke/gist:1411146
Created December 22, 2020 04:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trasherdk/45b750cede99b32ac940aa1005d0a07c to your computer and use it in GitHub Desktop.
Save trasherdk/45b750cede99b32ac940aa1005d0a07c to your computer and use it in GitHub Desktop.
Git: Setting up a Remote Repository and Doing Initial Push

Setup remote repository:

ssh git@example.com
mkdir my_project.git
cd my_project.git
git init --bare

On local machine:

cd my_project
git init
git add *
git commit -m "Initial commit"
git remote add origin example.com:my_project.git
git push -u origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment