Git Basics
Create a repository
Section titled “Create a repository”git init
Clone an existing repository
Section titled “Clone an existing repository”git clone https://github.com/utilisateur/projet.git
Check the status of files
Section titled “Check the status of files”git status
Add files to the staging area
Section titled “Add files to the staging area”git add file.txtgit add .
Create a commit
Section titled “Create a commit”git commit -m "Short Message"
Best practices
Section titled “Best practices”- Always check
git status
before committing. - Write explicit commit messages.
- Commit often, but only with coherent changes.