How do I use Git

Git, version control, repository, commit, push, pull, branch, merge, clone
Git is a distributed version control system that allows multiple developers to work on a project simultaneously while maintaining the integrity of the source code.
// Initialize a new Git repository git init // Clone an existing repository git clone https://github.com/user/repository.git // Check the status of the repository git status // Stage changes for commit git add . // Commit changes git commit -m "Your commit message here" // Push changes to the remote repository git push origin main // Pull changes from the remote repository git pull origin main // Create a new branch git branch new-feature // Switch to a different branch git checkout new-feature // Merge changes from one branch to another git merge new-feature

Git version control repository commit push pull branch merge clone