git - Grundlagen

Thomas W. Stütz

Zur Person

  • Technologien

    • Java / JakartaEE / Quarkus

    • Android (Kotlin)

    • Docker, k8s

    • git / github

    • doc-as-code (Asciidoctor)

    • IoT

Gründe für VCS

  • VCS …​ Version Control Systems

  • Keine Daten gehen verloren, auch ältere Programmversionen stets verfügbar

  • Zentralisiertes Code-Repository für Programmier-Teams

  • Geordnetes Erstellen von Programmvarianten (Branches)

  • u.v.m.

Git for Schools

github profile
  • Benefits

    • GitHub Pro

    • swag

Git vs GitHub

Centralized VCS

centralized vcs

Distributed VCS

distributed vcs

git Workflow

git workflow

Create a Local Repo

mkdir my-first-repo
cd my-first-repo
git init
ls -a
tree -f .git # für Finder: open .git
rm -rf .git  # -> beim prompt verschwindet die git info
git init

Add Files to Local Repo

Create Remote Repo

  • Config github authentification

  • Create repo in github

  • Connect your local folder to the github-repo

Authenticate to Remote Repo

Pull Requests

  • Wofür?

    • für Teams mit Senior- und Junior-Developers

    • bei open-source-Projekten

  • Wie?

    • Projekt clonen

    • Änderungen vornehmen

    • Pull Request beantragen

    • Pull Request annehmen oder ablehnen