Skip to content

Instantly share code, notes, and snippets.

@d21anthony
Created March 27, 2014 05:30
Show Gist options
  • Save d21anthony/9800954 to your computer and use it in GitHub Desktop.
Save d21anthony/9800954 to your computer and use it in GitHub Desktop.
Getting started with git how to post to github remotely github push no username or password using ssh
/* Git definitely has many advantages in procuring your hard work. Ensuring your recently completed working files and or directories are stored and safe is almost priceless. Git can be a bear to get started with, but I've posted commands to get you and your repo up and running in no time. I did some googling and found some great resources by others and though I'd make a mash-up of everything I found in simple yet effective list of commands to make your life easier. */
"Getting started with git"
"how to post to github remotely"
"github push no username or password using ssh"
/* Firstly, if you are working on a new project I recommend doing the following:*/
git init
git add . // Adds everything in current directory.
git commit -m "This is a message related to the soon to be update"
git remote add origin https://github.com/<username>/<project>.git
git remote -v // See if your paths are set correctly.
git remote set-url origin [email protected]:<username>/<project>.git // Create a ssh tunnel to your repository NOTE: you must have your public key added to git account
/* Preliminary SSH tunnel instructions (i.e. No username or password required) */
cat ~/.ssh/id_rsa.pub
copy public key - including ssh-rsa in the beginning
Open github account > settings > ssh keys -> add ssh key()
ssh -T [email protected] // This syncs your computer to your github account
// Of course it may be different for everyone but this worked for me.
/* How I use git on a daily basis as a lone wolf */
Make modification to project.file
git add project.file
git commit -m "Updated file"
git push // Done! Well, hopefully you are.
// If your repository has already been updated from someone else or from within git hub directly.
git pull origin master
@d21anthony
Copy link
Author

If you some how stumble across this list and find it useful, enjoy.

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