BASIC GIT COMMANDS

Estimated reading: 1 minute 24 views

git clone [repository_url]: Clone a repository from a remote URL to your local machine.

git add [file(s)]: Add file changes to the staging area. You can add specific files or use a dot (.) to add all changes.

git status: Check the status of your working directory and staging area. It shows which files are modified, staged, or not tracked.

git commit -m "[commit_message]": Commit staged changes with a descriptive message.

git push: Upload local repository content to a remote repository.

git pull: Fetch changes from a remote repository and merge them into the current branch.

git branch: List all local branches in the repository.

git checkout [branch_name]: Switch to a different branch.

Share this Doc

BASIC GIT COMMANDS

Or copy link