Skip to content

Instantly share code, notes, and snippets.

@jjjjcccjjf
Last active January 29, 2017 07:46
Show Gist options
  • Save jjjjcccjjf/ec105cad162a9799aa02f4c5c084d2ff to your computer and use it in GitHub Desktop.
Save jjjjcccjjf/ec105cad162a9799aa02f4c5c084d2ff to your computer and use it in GitHub Desktop.
How to add remote repository from working copy

#git init

#git add . Adds the files in the local repository and stages them for commit

#git commit -m 'First commit' Commits the tracked changes and prepares them to be pushed to a remote repository

git remote add origin

Sets the new remote

git remote -v

Verifies the new remote URL

git push origin master

Pushes the changes in your local repository up to the remote repository you specified as the origin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment