DevOps

Version Control & Git

Git basics, branches, merge, rebase, pull requests, commit conventions, gitflow workflow

20 Interview-Fragen·
Junior
1

What is Git?

Antwort

Git is a distributed version control system that tracks changes to source code over time. Each developer has a complete copy of the project history on their local machine, unlike centralized systems like SVN. This enables offline work and provides better resilience as there is no single point of failure.

2

Which command initializes a new Git repository in a folder?

Antwort

The git init command creates a new local Git repository in the current directory by creating a hidden .git subfolder containing all repository metadata files. This command is the first step to start tracking changes with Git in an existing or new project.

3

Which command adds files to the staging area (index) before committing them?

Antwort

The git add command adds file changes to the staging area (transit zone). This intermediate step between modification and commit allows you to precisely select which changes to include in the next commit. For example, git add . adds all modified files, while git add file.txt adds only that specific file.

4

Which command records changes from the staging area into Git history?

5

How to create a new Git branch and switch to it immediately?

+17 Interview-Fragen

Meistere DevOps für dein nächstes Interview

Zugang zu allen Fragen, Flashcards, technischen Tests, Code-Review-Übungen und Interview-Simulatoren.

Kostenlos starten