Git

.gitignore file (no extension) example (finish folder with / to add all files)

some_folder/
**/some_folder no matter the parent folder/  # great for cache folders
/specific_file.txt
*/    # all folders
*.ext   # all files with extension ext
git status
git clone # use SSH instead of HTTPS always
git fetch
git pull
git push
git commit
git add
git remote -v  # shows origin URL
git branch -M main    # rename current branch into main
git remote update
git branch new-feature  # this will create branch of a current branch, but not switch 
git branch -d my-feature-branch  # deletes local branch, use -D to force it
git branch -r  # see all remote branches
git push origin -d my-feature-branch   # to delete remote branch 
git checkout feature-branch
git merge feature-branch  # to merge feature-branch into current branch 
git config --global user.email "you@example.com"
git config --global user.name "Your Name"

git clone via SSH

There are several ways to clone a repo but SSH is the easiest and most secure so use it always instead of HTTPS.

See this to set up SSH access.

If git connection is HTTPS then user is asked for username/password. Instead of a password, provide a token, that can be generated like this. It’s better however to simply use SSH.