# Git & GitHub - Fundamentals (Data Engineering) > Branching, merge, rebase, pull requests, gitflow, .gitignore, hooks, CI/CD workflows - 20 interview questions - Junior - [Interview Questions: Data Engineering](https://sharpskill.dev/en/technologies/data-engineering/interview-questions.md) ## 1. Which command initializes a new Git repository in an existing directory? **Answer** The git init command creates a new Git repository in the current directory by initializing the .git subdirectory containing all files needed for versioning. This command is the first step to start tracking changes in an existing project. ## 2. What is the difference between git clone and git init? **Answer** git init creates a new empty repository in the current directory, while git clone copies an existing remote repository to the local machine, including the full commit history and branches. git clone also automatically sets up the connection with the remote repository (origin). ## 3. Which command creates a new branch and switches to it in a single operation? **Answer** The command git checkout -b branch_name creates a new branch and immediately switches to it. Since Git 2.23, git switch -c branch_name can also be used and is more explicit. These commands avoid doing git branch followed by git checkout. ## 17 more questions available - What is the main difference between git merge and git rebase? - Why should rebasing commits already pushed to a shared branch be avoided? Sign up for free: https://sharpskill.dev/en/login ## Other Data Engineering interview topics - [Linux & Shell - Fundamentals](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/linux-shell-basics.md): 20 questions, Junior - [Advanced Python for Data Engineering](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/python-advanced-de.md): 25 questions, Junior - [Docker - Fundamentals](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/docker-fundamentals.md): 25 questions, Junior - [Google Cloud Platform - Fundamentals](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/gcp-fundamentals.md): 20 questions, Junior - [CI/CD and Code Quality](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/ci-cd-code-quality.md): 20 questions, Mid-Level - [Docker Compose](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/docker-compose.md): 20 questions, Mid-Level - [FastAPI - Data APIs](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/fastapi.md): 20 questions, Mid-Level - [Advanced SQL for Data Engineering](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/sql-advanced-de.md): 20 questions, Mid-Level - [Data Lake - Architecture and Ingestion](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/data-lake.md): 20 questions, Mid-Level - [BigQuery for Data Engineering](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/bigquery-de.md): 20 questions, Mid-Level - [PostgreSQL - Administration](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/postgresql-admin.md): 20 questions, Mid-Level - [Data Modeling for Data Engineering](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/data-modeling-de.md): 20 questions, Mid-Level - [Fivetran & Airbyte - Data Ingestion](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/fivetran-airbyte.md): 20 questions, Mid-Level - [dbt - Fundamentals](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/dbt-fundamentals-de.md): 20 questions, Mid-Level - [Apache Airflow - Fundamentals](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/airflow-fundamentals.md): 20 questions, Mid-Level - [Kubernetes - Fundamentals](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/kubernetes-fundamentals.md): 20 questions, Mid-Level - [dbt - Advanced Features](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/dbt-advanced-de.md): 20 questions, Senior - [ETL / ELT / ETLT Patterns](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/etl-elt-patterns.md): 20 questions, Senior - [Apache Airflow - Advanced](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/airflow-advanced.md): 20 questions, Senior - [Airflow + dbt - Pipeline Orchestration](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/airflow-dbt-integration.md): 20 questions, Senior - [PySpark - Large-Scale Processing](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/pyspark.md): 20 questions, Senior - [Google Pub/Sub - Data Streaming](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/pubsub-streaming.md): 20 questions, Senior - [Apache Beam & Dataflow](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/apache-beam-dataflow.md): 20 questions, Senior - [Kubernetes - Production and Scaling](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/kubernetes-advanced.md): 20 questions, Senior - [Terraform - Infrastructure as Code](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/terraform.md): 20 questions, Senior - [NoSQL Databases](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/nosql-databases.md): 20 questions, Senior - [Modern Data Architecture](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/data-architecture.md): 20 questions, Senior - [Monitoring and Observability](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/monitoring-observability.md): 20 questions, Senior - [IAM and Data Security](https://sharpskill.dev/en/technologies/data-engineering/interview-questions/iam-security-de.md): 20 questions, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/en/technologies/data-engineering/interview-questions/git-github-fundamentals