--- creation date: 2024-08-22 modification date: Thursday 22nd August 2024 11:56:21 tags: --- # Preamble ### Notable Links ## What are we doing? Learning how to use Github. This will probably be the easiest way to keep files synced between working at home and working on my laptop. This way, I can also just pull files down to really any machine and make things shareable. I also want to keep my neovim config up there in the cloud ## Why are we doing it? For code based things, transferring to and from the server is annoying. Maybe Git is the answer. ## Who cares? Me, for now. # Learning to Use **Github** ## Preliminary Setup Create a ssh key on the terminal if you don't have one: ```bash ssh-keygen -t ed25519 -C "dane.sabo@pitt.edu" ``` Copy the contents of this key: ```bash cat ~/.ssh/id_ed25519.pub ``` Notably, the public key is .pub. Do NOT copy the private key. Upload this key to GitHub- go to settings>SSH and GPG keys>add the new key Then add they key to the local SSH agent: ```bash eval "$(ssh-agent -s)" sshadd ~/.ssh/id_ed5519 ``` ## Using an existing repository ```bash # Cloning a Repository git clone git@github.com:danesabo/example_repo.git #Staging and Committing Changes git add . #adds all files git commit -m "Commit message here!" #Push the changes to GitHub git push origin master #or main ```