Skip to content

Instantly share code, notes, and snippets.

@dylanerichards
Created September 8, 2016 20:32
Show Gist options
  • Save dylanerichards/1f9f8e4d8b46c6900d875e97a04f5855 to your computer and use it in GitHub Desktop.
Save dylanerichards/1f9f8e4d8b46c6900d875e97a04f5855 to your computer and use it in GitHub Desktop.
Making a repo
➜ new-repository git init
Initialized empty Git repository in /Users/dylanrichards/code/new-repository/.git/
➜ new-repository git:(master) touch index.html
➜ new-repository git:(master) ✗ gd
➜ new-repository git:(master) ✗ gaa
On branch master
Initial commit
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: index.html
➜ new-repository git:(master) ✗ gc "Initial commit"
[master (root-commit) b2f78eb] Initial commit
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 index.html
➜ new-repository git:(master) gp
fatal: No configured push destination.
Either specify the URL from the command-line or configure a remote repository using
git remote add <name> <url>
and then push using the remote name
git push <name>
➜ new-repository git:(master) git remote add origin https://github.com/dylanerichards/new-repository.git
➜ new-repository git:(master) git push -u origin master
Username for 'https://github.com': dylanerichards
Password for 'https://[email protected]':
Counting objects: 3, done.
Writing objects: 100% (3/3), 221 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://github.com/dylanerichards/new-repository.git
* [new branch] master -> master
Branch master set up to track remote branch master from origin.
➜ new-repository git:(master)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment