Terminal To Private Github Repo
Open a terminal on your linux system and try:
ssh-keygen -t ed25519 -C "git@github.com"
It will ask you to enter a name for a file (at which point you should probably preface it with a directory path of /home/username/.ssh/your-filename-here), and then a password.
Okidoki, once that's done, run
ssh-add ~/.ssh/your-filename-here
cat ~/.ssh.your-filename-here.pub
Ok.. almost done.. the first command should have also made a your-filename-here.pub file in the same directory as your-filename-here. Get the contents of that file with cat
or your favorite text editor, and copy it into the "Key" box on https://github.com/settings/ssh/new and be sure to "Title" it whatever you want so you remember which Linux box you did this from.
Then click "Add SSH key" button on the website.
Ok back to your Linux system. Navigate to a directory you want to be working with/from.
git init
git remote add origin git@github.com:USERNAME/REPO-NAME.git
git fetch origin main
git pull
And now you should have the files in the directory to work on. Once you are done working:
git add .
git commit -m "bla bla"
git push -u origin main
And that should push your changes to github!
git reset
git remote -v
git pull --rebase
git init
git add -A
git commit -m "Add your commit"
git branch -M main
git push origin main --force