9
edits
No edit summary |
mNo edit summary |
||
| Line 5: | Line 5: | ||
== What is Git? == | == What is Git? == | ||
Git is a version control system, used by almost every developer. It allows you to see changes you've made to your code and roll back the project or specific files to previous versions. It is extremely useful for collaborating with several developers via a remote repository and for finding out what happened when a change breaks your project. | |||
== How does it work? == | == How does it work? == | ||
| Line 12: | Line 12: | ||
There are three main states in a git repository: | There are three main states in a git repository: | ||
* The Working Directory. This the code you are working on, and you can make changes as you like! | |||
* The Staging Area. These are the files that you plan for git to save a snapshot of. | |||
* The Git Repository (repo). This is the ".git" directory made when you initialize a new repo. It tracks and saves the snapshots of your files. | |||
In practice, it looks like this: | In practice, it looks like this: | ||
* You work on your code and make changes | |||
* You "stage" the files you've changed | |||
* You then "commit" these staged files, adding them to the repository. | |||
edits