Git Basics
Header
Your content here
Current Config
git config --list
Configure user and email
git config --global user.name "Your Name"
git config --global user.email "email@email.com"
Clone a repo:
git clone
Get the current branch:
git status
Add a folder:
git add .
Create a commit (Local):
git commit -m "BGA First Commit"
Push modificatiosnto the remote branch:
git push
Get the last version of the repo from the remote branch:
git pull
Change branch:
git checkout mybranch
List local branches:
git branch
List remote branches:
git branch -r
List local and remote branches:
git branch -a
Delete a branch (Local):
git branch -d my-branch-name
git branch -D my-branch-name
Configure repo:
git config βglobal user.name Β« Your Name Β»
git config βglobal user.email you@example.com
Logs:
git log -v
git log -p
Create a branch (local):
git branch my-new-branch
git checkout -b feat-azure-functions
Delete branch (Local):
git branch -d my-branch
Delete branch (Remote):
git push origin -d my-branch
Lit modified files
git diff -r --no-commit-id --name-only