Quick Cheatsheets
git
commands are not working in CMD—or PowerShell)Git Bash is a command-line interface for Windows that provides users with a Unix-like shell experience. It allows users to execute Git commands and also provides a number of Unix commands commonly used in Linux and Mac OS X environments. Git Bash can be used as an alternative to the Windows Command Prompt or PowerShell when working with Git repositories or performing other tasks that require a Unix-style shell.
Git Bash is a command-line interface that allows you to interact with the Git version control system on Windows. Below is a list of commonly used Git Bash commands along with brief explanations of what each command does:
git init
:
Explanation: Initializes a new Git repository in the current directory, creating a new .git
directory that will store the version history and configuration.git clone [repository_url]
:
Explanation: Creates a copy of a remote Git repository on your local machine. The [repository_url]
should be the URL of the remote repository you want to clone.git add [file(s)]
:
Explanation: Adds the specified file(s) to the staging area, preparing them for the next commit. You can use wildcards (e.g., git add .
to add all files).