# [[Git]] [site](https://git-scm.com/) ![[Git.svg]] ## What is Git? Git is a free and open-source [[Version Control System]] that is specifically designed to track changes in code. Its branching feature is particularly noteworthy because it facilitates collaboration and experimentation while maintaining the integrity of the main branch. It was first developed in 2005. ## Installing Git On a Mac, try to run: ``` git --version ``` And if you don't already have it installed, you'll get a prompt to install it. [Here's how to install it for other operating systems](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git). ## Using Git - [[Cloning a remote repo with Git]] - [[Pushing a local repo to GitHub]] - [[Branching in Git]] - [[Rolling back changes in Git]] - [[Removing changes not added to staging]] - [[Working with remotes in Git]] - [[Ignoring files in Git]] - [[Rebasing in Git]] - [[Stashing in Git]] - [[Submodules vs subtrees vs worktrees in Git]] - [[Submodules in Git]] - [[Subtrees in Git]] - [[Worktrees in Git]] - [[Tagging in Git]] - [[List commits chronologically]] - [[Viewing a PR locally in Git]] - [[Remove changes from staging]] - [[How to rename a repository]] - [[Pulling from upstream repository]] - [[Forcing a push to git]] - [[Reverting a commit in Git]] ### Credentials in Git - [[Adding credentials in Git]] - [[Stop Git from asking for your password all the time]] - [[Setting up multiple GitHub accounts on the same machine]] ### Troubleshooting - [[Fatal not a git repository error in Git]] - [[Removing large files from repo in Git]] - [[Choosing which version to keep while resolving merge conflicts in Git]] - [[No such ref was fetched error in Git]] - [[Undo options for when you stuff things up in Git]] ## [[Git best practices]] ## Git hosting services Git hosting services allow you to store your Git repositories on the cloud and share them with others. [[Article/Git vs. GitHub: What’s the Difference?]] - [[GitHub]] - [[GitLab]] ## Git UIs Below are some visual interfaces for Git that make it a little easier to spot issues. - Default: [[git-gui]] - [[Atlassian SourceTree]] - [[GitHub Desktop]] - [[Fork (app)]] - [site](https://git-fork.com/) ## [[GitOps]] ## See also - [[Software Development]] - [[Viewing a PR locally in Git]] - [[How to use k6 with GitHub Actions]] - [[Branching in Git]] - [[How to generate an SSH key on the YubiKey for GitHub]] %% # Excalidraw Data ## Text Elements ## Embedded Files f3dffc59bd86eac48de111694e632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