git status |
Display the current state of the repository, including which files are staged or unstaged |
git add <file> |
Stage a file for commit |
git add . |
Stage all changes (including untracked files) for commit |
git commit -m "<message>" |
Commit staged changes with a descriptive message |
git push origin <branch> |
Push local commits to a remote repository on the specified branch |
git clone <url> |
Clone a remote repository to your local machine |
git init |
Initialize a new Git repository |
git remote add origin <url> |
Add a new remote repository to the list of remotes |
git checkout <branch-name> |
Switch to an existing branch |
git checkout -b <branch-name> |
Create a new branch and switch to it |
git pull origin <branch> |
Fetch changes from a remote repository and merge them into the current branch |
git branch |
List all branches in the repository |