1.7 KiB

Git Repository

Purpose: Initialize and configure a Git repository for version control of the project.

Requirements

Requirement: Git repository initialization

The system SHALL initialize a Git repository in the project root with git init.

Scenario: Repository is created

  • WHEN git init is executed in the project directory
  • THEN a .git directory exists and git status reports a clean working tree

Requirement: Main branch creation

The system SHALL create and checkout a main branch as the default branch.

Scenario: Main branch is active

  • WHEN git checkout -b main is executed
  • THEN git branch shows main as the current branch

Requirement: Initial commit with README

The system SHALL create a README.md file, stage it, and create an initial commit.

Scenario: First commit exists

  • WHEN README.md is created, staged with git add, and committed with git commit -m "first commit"
  • THEN git log shows one commit with the message "first commit"

Requirement: Remote repository connection

The system SHALL add a Git remote pointing to the specified Gitea repository URL.

Scenario: Remote is configured

  • WHEN git remote add origin https://git.veit-fraenzer.de/veitR/PokeR.git is executed
  • THEN git remote -v shows the origin remote with the correct URL for both fetch and push

Requirement: Push to remote

The system SHALL push the main branch to the remote repository and set upstream tracking.

Scenario: Initial push succeeds

  • WHEN git push -u origin main is executed with valid credentials
  • THEN the local main branch tracks the remote origin/main and all commits are pushed