Git Cheat Sheet · Getting started

Open an existing repository

cd <folder>

A Git repository does not need to be "opened" on the command line: you just go to its folder with cd. All Git commands then apply to the repository that contains the current folder.

What it does

A repository already on disk opens as is, in the current tab or a new tab.

A use case

You are working on two projects at once and want to switch between them without closing them.

On the command line

cd <folder>
Goes to the repository.
git rev-parse --show-toplevel
Shows the root of the repository that contains the current folder.
git -C <folder> status
Runs a command in another repository without changing folder.

In Merathon

  1. Repository menu → "Open…" (Ctrl+O), or a repository from the "Recent" list.
  2. Ctrl+T opens a new tab, Ctrl+Shift+N a new window.

Frequently asked questions

How do I know whether a folder is a Git repository?

Run git status in it: outside a repository, Git answers "not a git repository". A repository has a hidden .git folder at its root.

Can I open several repositories at once in Merathon?

Yes: each repository opens in its own tab (Ctrl+T) and keeps its state when you switch between them.

See also