liveBook · Manning

Repository

As explained in Build Python Web Apps with Streamlit

A Git repository is a project directory managed by Git that stores files together with their version history and staging metadata.

A Git repository is a project directory managed by Git. It stores files alongside their revision history and uses staging metadata to prepare exact snapshots of changes. GitHub hosts Git repositories online; Git itself is the version-control system. section 5.2.1

Use a local and remote repository together when preparing an app for deployment:

  • Create a public repository on GitHub and record its repository URL. section 5.2.2
  • Initialize the application directory with Git using git init. section 5.2.2
  • Stage the project files with git add ., then commit a snapshot with a descriptive message. section 5.2.2
  • Add the GitHub repository as the origin remote and push the committed code. section 5.2.2

Publishing a to-do app

A directory containing todo_list.py and task.py can become a local repository, receive its first commit, and connect to a GitHub remote named origin. After pushing the code, Streamlit Community Cloud can deploy the app by linking to that GitHub repository. section 5.2.2 section 1.3.8

git init

Inspect the command sequence for initializing the local repository, staging files, committing a snapshot, configuring origin, and pushing to GitHub. section 5.2.2

How Build Python Web Apps with Streamlit covers it

How deep it goes
Explains repository creation, initialization, staging, committing, remote configuration, and pushing, but not broader Git workflows.
Examples
Uses a Streamlit to-do list containing todo_list.py and task.py, with command-line commands for committing and pushing it.
What it assumes
Assumes Python and Streamlit familiarity while introducing Git, GitHub accounts, repository hosting, and personal access tokens.
What you can do after
Build it from scratch by creating a GitHub repository, committing local files, and pushing them to a remote.
How it connects
Connects Git repositories with GitHub, Git, staging, commits, remotes, personal access tokens, and Streamlit Community Cloud.

Also explained in

Compare how 10 books explain repository →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build Python Web Apps with Streamlit. The section links point to the parts of the book it draws on.