git init: Initializes a new Git repository.git clone <repository-url>: Clones an existing repository from a URL to your local machine.git status: Shows the status of changes in the working directory.git add <file>: Stages changes in a file for the next commit.git commit -m "commit message": Commits the staged changes with a message.git push: Pushes commits from your local repository to the remote repository.git pull: Fetches and merges changes from the remote repository to your local branch.git branch: Lists, creates, or deletes branches.git checkout <branch-name>: Switches to a different branch.git merge <branch-name>: Merges the specified branch into the current branch.git log: Displays the commit history for the current branch.git remote -v: Shows the remote repositories linked to your local repository.git reset <file>: Unstages a file, keeping the changes in the working directory.git diff: Shows the differences between the working directory and the staged changes.
Basic Git Commands
•
Leave a Reply