Essential Git for Scientists
  • Introduction
  • Basic Concepts
    • Version Control
    • Git
    • Repo
    • Commits
    • Branches
    • Remotes
    • GitHub
    • De-centralisation
    • Summary
  • Basic Operations
    • Install Git
    • Create a Repo
    • Make a Commit
    • Inspect a Previous Commit
    • Revert a Change
    • Make a Branch
    • Extend a Branch
    • Fast-forward merge
    • Resolve conflicts
  • Intermediate Concepts
    • Commits
    • Three Trees
    • Rebase
    • Fetch
    • Pull
    • Push
  • Advanced Concepts
    • Reset
    • Interactive rebase
    • Formatted patches
    • Blame
    • Stash
    • Log filter
  • Cookbook
    • Undo
    • Branches
    • Diff
    • Stash
    • Merge
    • Hooks
    • Squashing
    • Rebase
    • Interactive Rebase
    • LFS
    • Submodules
    • Remote
    • Force push
    • Identify merged branches
    • Formated patches
    • Apply patches
    • Interactive rebase
    • Squash commits
    • Pull rebase
    • Log
    • Blame
    • Biset
    • Reset
  • Exercise
    • Exercise 1
    • Exercise 2
Powered by GitBook
On this page
  1. Basic Concepts

Repo

A repository (or repo for short) is a unit building block for Git. A repo to a project is like a cell to an organism.

  • You can have one repo, working on your own (e.g. single-cell animal) or

  • multiple repos that different people are working on, but keep inter-communicating (e.g. bateria transfer DNA materials using plasmids)

A repo extends the concept of a folder (i.e. a working directory, which you typically view in a file explorer). There are actually three main components in a repo (often known as three trees, the working directory being one of them). More on this later.

Git stores the tracking information in a folder named.git. It contains all the previous histories of code edit. Having the .git folder signifies that the parent folder is a Git repo.

You don't need to manually interact with the .git folder. Everything should be via Git commands.

Note that files or folders starting with a dot are hidden on Linux. You need to use ls -a to explicitly list all items.

PreviousGitNextCommits

Last updated 1 year ago