git
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| git [May 14, 2026 at 11:38] – external edit 127.0.0.1 | git [August 22, 2026 at 15:22] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| # Git | # Git | ||
| - | **Git** is a tool for managing repositories. Repositories are like folders, except it's easier to track the changes that happen inside them. | ||
| - | Think of a project you've been working on e.g. a game in written in C++. | + | **Git** is a version control system for tracking changes to code. Initialize |
| - | You've been working on your game for weeks and now you have quite a bit of code. You're starting | + | Every change is recorded as a **commit**, a snapshot of your project at a point in time. You can view history, revert |
| - | So, like any prudent developer, you make backups. You copy the "Game" | + | ```bash |
| + | $ git init # create a repository | ||
| + | $ git add . # stage changes | ||
| + | $ git commit -m "message" | ||
| + | $ git push origin main # push to remote | ||
| + | ``` | ||
| - | Even worse, some of these " | + | On a multi-person project, branching lets each developer work in isolation without conflicts. Create a branch, make changes, and merge back when ready. |
| - |  | + | ## Concepts |
| + | |||
| + | 1. [[git-repositories|Repositories]] | ||
| + | 2. [[git-commits|Commits]] | ||
| + | 3. [[git-staging|Staging]] | ||
| + | 4. [[git-branches|Branches]] | ||
| + | 5. [[git-merging|Merging]] | ||
| + | 6. [[git-rebasing|Rebasing]] | ||
| + | 7. [[git-remotes|Remotes]] | ||
| + | 8. [[git-pushing-and-pulling|Pushing and pulling]] | ||
| + | 9. [[git-undoing|Undoing changes]] | ||
| + | 10. [[git-history|History and viewing commits]] | ||
| + | 11. [[git-tags|Tags]] | ||
| + | 12. [[git-conflicts|Conflicts and conflict resolution]] | ||
| + | 13. [[git-stashing|Stashing]] | ||
| + | 14. [[git-cherry-pick|Cherry-pick]] | ||
| + | 15. [[git-hooks|Hooks]] | ||
| + | 16. [[git-workflows|Workflows]] | ||
| - | Okay, this is way too many backups. Surely, there' | ||
| - | Yes! That is exactly the problem that Git solves. | ||
git.1778758708.md.gz · Last modified: by 127.0.0.1
