Git Tutorial

git config --list

git init     > Initialize a repository on a local folder, 

touch .gitignore > Create the gitignore file

git add -A > Add all files to the stage

git reset [file] > Remove a specific file from the stage

git diff

git diff --staged

git commit -m "[description]" > Commit changes

git remote add origin git@github.com:user_name/repo_name.git > Add

git branch -M main > Create branch named main and set as main branch 

git push -u origin main > Push and set the main upstream as main branch

git branch > List branches

git branch new_branch > Create a branch named new_branch

git checkout new_branch > Switch to the branch

git branch -d new_branch > Delete the branch

git checkout -b new_branch > Create and switch to the branch

git merge [branch]

git log