Introduction to Git

You should know about Git

  • Your git folder contains the whole repository
  • No access to the remote repository is needed for branch switching
  • You can commit changes without sending the commit to the remote repository

Git Cheat Sheet

git clone <url>
Clones the remote repository to your local machine
git add .
Adds all changed files to the next commit
git branch --all
Show all branches
git commit -m "message"
Commits Changes with the specified message
git checkout <branch>
Checks out the specified branch
git pull
Load changes from the remote repository
git push
Pushes commits to the remote repository
git reset --hard
Reverts all changes since the last commit