Last active
August 29, 2015 13:56
-
-
Save weirdbricks/8980223 to your computer and use it in GitHub Desktop.
starting-with-a-new-repository
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Create new repository, go here: | |
https://github.com/new | |
2. Give it a name and tick 'Initialize this repository with a README', then click on 'Create Repository', for this example the name will be 'reload-jail' | |
3. On your shell initialize the new repository: | |
git init reload-jail | |
4. Go into the repository directory: | |
cd reload-jail/ | |
5. Add the remote repository: | |
git remote add origin [email protected]:weirdbricks/reload-jail.git | |
^You get the above link by going to your repositories (https://github.com/weirdbricks?tab=repositories), click on your repository and copy the 'SSH clone URL' | |
6. Before you push you'll need to have your SSH keys in place - check for your current user with: | |
ls ~/.ssh/ | |
If you don't have keys, create them with: | |
ssh-keygen | |
Copy the PUBLIC key only (usually the file ~/.ssh/id_rsa.pub provided you took the defaults when creating the SSH key) | |
Paste the key here: https://github.com/settings/ssh | |
Test that your key works with GitHub to retain sanity: | |
ssh -T [email protected] | |
You should get a prompt to add github.com to the list of known hosts, answer 'yes' and you should get: | |
Hi weirdbricks! You've successfully authenticated, but GitHub does not provide shell access. | |
7. Set your username and e-mail for commits: | |
git config --global user.email "[email protected]" | |
git config --global user.name "Lampros" | |
8. Sync the remote with the local repository: | |
git pull origin master | |
8. Create a test file, add it, commit it and push it: | |
touch test.txt | |
git add test.txt | |
git commit -m 'testing' | |
git push origin master | |
9. Delete the repository - GONE FOR GOOD! be careful :) | |
go here: https://github.com/weirdbricks/reload-jail/settings | |
and click on 'Delete this repository' | |
10. Delete it locally by simply removing the directory: | |
rm -r -f reload-jail/ | |
Note1: | |
If you're getting this error when you're trying to push: | |
You can't push to git://github.com/weirdbricks/reload-jail.git | |
Use https://github.com/weirdbricks/reload-jail.git | |
Fix with: | |
git remote set-url origin [email protected]:weirdbricks/reload-jail.git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment