GithHud Identification
git config --global user.email "david.pasek@gmail.com"
git config --global user.name "davidpasek"
GithHub SSH authentication
// *********** github SSH public key
ssh-keygen -C "david.pasek@gmail.com"
Add pub key (.ssh/id_rsa/id_rsa.pub) to GitHub ... Settings > SSH and GPG keys > New SSH key
// *********** Test if your ssh authentication works
ssh -T git@github.com
// *********** Clone your existing repostiory - davidpasek/uw.cz-gitops
git clone git@github.com:davidpasek/uw.cz-gitops
or
git clone git@github.com:davidpasek/uw.cz-gitops.git
Create new GitHub repository
// *********** Create new git repository from directory
Create a directory to contain the project.
Go into the new directory.
Type git init
Write some code.
Type git add -A to add all the files from current directory.
Type git commit
// *********** You must create the repository on GitHub manually
Type git remote add origin git@github.com:davidpasek/[REPOSITORY-NAME].git
Type git push push --set-upstream origin main
Clone existing GitHub repository
// *********** Clone existing github repository with username and token
git clone https://github.com/davidpasek/math4kids
// *********** Clone existing github repository with SSH key
git clone git@github.com:davidpasek/uw.cz-gitops.git
// *********** Add file to github
git status
git add file.html
git commit -m "Commit comment"
// push back to github
git push
// pull out from github
git pull
// *********** Add all files in local directory to github
git add -A
git commit -m "Initial add of files into the repository"