Member-only story
Source:- Git Interview Questions
If you’re on a free Medium plan, click here to read — Free Access
For more questions and answers visit our website at frontend interview questions
Git is a distributed version control system commonly used for tracking changes in source code during software development. It allows multiple developers to work on a project simultaneously, keeping track of changes made to files over time, and enables collaboration and efficient management of code repositories. Here are some of the most useful Git commands:
- `git init`: Initializes a new Git repository in the current directory.
- `git clone `: Creates a copy of a remote repository on your local machine.
- `git add `: Adds a file to the staging area, preparing it for a commit.
- `git commit -m “”`: Records changes to the repository, creating a new commit with a descriptive message.
- `git status`: Displays the current state of the repository, including modified, staged, and untracked files.
- `git pull`: Fetches and merges changes from a remote repository into the current branch.