0

What I've read

A Git repository is the . git/ folder inside a project. This repository tracks all changes made to files in your project, building a history over time. (Source)

Repository: A collection of files which are kept together. (Source)

A software repository, or “repo” for short, is a storage location for software packages (Source)

Question

  1. To my understanding, Git repository and software repository are different things. Is it correct?

  2. In context of Git, What does it mean when one refers to repository? Does it mean both "working files and Git repository" or just Git repository?

  3. GitHub and Source Forge are examples of software repository. Is it correct?

2
  • 2
    Software repository is vague, but often refers to a package repository like NuGet or Maven. Git is specifically for storing source code. – Dan Wilson Feb 16 at 15:18
  • 2
    There are other types of source control than Git! – user253751 Feb 16 at 16:10
2

You are correct about the git repository.

I usually hear what you are calling a software repository called a package repository or artifact repository. Those contain compiled binary packages marked with specific release numbers. The main one I can think of is maven.org.

It's a little confusing, though, because GitHub is primarily a source code repository, but it is also an artifact repository. You have pretty much always been able to download released packages from GitHub, and recently they added the ability to do the version resolution for libraries that most package repositories do. Really though, it's separate kinds of repositories that happen to be hosted from the same website.

2

A git repository is usually only the .git/ folder. But git repositories have -- in most cases -- a working directory, too. Only bare git repositories do not have a working directory, and those are only needed in special circumstances. When people talk about git repositories, its sometimes ambiguous if they only mean the .git/ folder, or .git/ folder and working directory. You will find, however, that this distinction is nearly meaningless in practice, since cloning a repo will also check out the working directory. And if some piece of software is tracked via git, changes in the working directory will be picked up by git. thus, there is little distinction between "the codebase" and "the repo", because both are more or less the same thing -- the codebase is in the working directory, which is intrinsically linked to the repo anyways.

A software repository and a source code repository are different things. A git repo or SVN repo are source code repos. They typically contain the source for one piece of software or one project, although its technically possible to shoehorn multiple pieces of software into the same repo.

A software repository on the other hand typically houses the artifacts of many software projects. Another term for a software repository is a registry, like the docker registry or npm registry. Maven repositories or the various repositories for Debian packages are two examples for such software repositories.

Nowadays, it becomes more and more popular to connect these repositories. For example, a change in the git repository might cause the CI/CD pipeline to run, which in turn will upload the built artifact to a software repo, and possibly also a ready-to-use docker container to a docker registry.

Services like GitLab and GutHub are taking on multiple roles. GitLab is primarily a hoster for git repos. Each git repo houses the source code for a piece of software. But they also offer package registries and docker registries where one can house their own artifacts. Similarly, GitHub also offers a container registry and a package registry. Those are mostly tied to the git repos hosted on those platforms, though, and not necessarily available for software hosted in other git repos.

1

I've seen this slight confusion before. By definition

Software Repository - A software repository, or “repo” for short, is a storage location for software packages.

  1. Yes, they can be different things but Software Repo is vague. Github, Gitlab are considered Software Repositories from a high level. You will also hear devs stating they are working on the API repo, UI repo, which are contained within Github/Gitlab.

  2. If the team is leveraging Git. Depending on the context of the conversation, when I hear someone say I'm working on the Repos. I am assuming they are working on a code base within our team's group or domain. I almost use repo/codebase as interchangeable.

  3. Yes these are considered software repositories. Github can almost be considered software repository as a service. They allow you to upload multiple repos online to collaborate on.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.