Git is a distributed version-control system for tracking changes in any set of files, originally designed for coordinating work among programmers cooperating on source code during software development. Its goals include speed, data integrity, and support for distributed, non-linear workflows.
Install git by visiting https://git-scm.com/downloads and install the appropriate binary for your OS.
git initto create a new repository in a directorygit addto track files for changesgit commitcommits those changes permanently in version control historygit pushto push your work to a remote Git hostgit logto see commit historygit remoteto see what remotes is your repo connected togit branchto create a new branchgit checkoutto switch to another branch- Tip: use
git checkout -bto create a new branch and switch to it
- Tip: use
git stashto remove all local changes in working directory since the last commit
All files and folders you add to the .gitignore file will not be checked into version control.