Because I’m tired of relearning how to use Github and looking up long boring videos full of commands I’ll never use. This simple cheatsheat is pretty much all I ever do for git commands.
Pulling/cloning a GitHub repo to your local computer:
Can do it from VScode terminal or with OS terminal. Make sure you’ve navigated to the right directory you want to work in!
git init– initializes Git session.
git clone firstname.lastname@example.org:your-repo-ssh-address.git– clones that repo to your local environment.
Push or update to GitHub repo:
git add .will automatically search for all file changes.
git commit -m "update notes", or you can use the full
git commit -m "something" -m "something"to put both update title and description.
git pushto push it back up to the GitHub repo.
git pull– I almost never use this. I typically clone and then only push. I’m rarely work on a production environment locally.
git status– if you’re ever randomly curious what’s matching or not.
- Repo permissions issues? – I’ve solved it by regenerating SSH keys and using my GitHub email address.