Get started
Repositories
Make a repository, clone and push with a token or an SSH key, browse files, history and blame, download code, store large files and search.
Make a repository
Choose New repository on the home page. Pick the owner (you or one of your organisations), a name, and what to start with:
- An empty repository
- The files of a template, when someone has marked a repository as a template (see Forks, templates and mirrors)
- A copy of a GitHub repository, a GitLab project, a Gitea or Forgejo repository, a Gerrit project, or any other Git host. See Moving to Fettlecode.
Private is ticked to start with: only people you give a role can see the repository. Untick it for a public one, which everyone signed in can read.
An empty repository offers Upload files and Create a file, or the commands to push a project you already have.
Clone and push
The Code tab shows the clone addresses under Clone and push from your own machine, each with a copy button.
Over HTTPS, with a token
Git asks for a username and password. The username can be anything; the password is a personal access token:
- Open your menu → Your settings and tokens.
- Under Personal access tokens, give the token a name and make it. Copy it now: it's shown only once.
- Use it as the password when Git asks. Your system's credential helper can remember it.
git clone https://code.example.com/wren/bookings.git
Over SSH
Add your public key under SSH keys in your settings, then clone with the SSH address:
git clone ssh://git@code.example.com:2222/wren/bookings.git
Pushing
Push to a branch as usual, if your role and the branch rules allow it. On a branch that needs review, the push is refused with a message saying how to send it for review instead: see Stacked review.
Secret scanning. A push or a web edit that adds a private key or a known kind of token (GitHub, GitLab, AWS, Slack, Stripe, Google, npm, OpenAI, Anthropic, SendGrid and others) is refused before anything is written, naming the file, line and commit. A line containing fettlecode:allow-secret is let through, for test fixtures. Repository admins can turn scanning off in Settings.
Browse the code
On the Code tab:
- Branch or tag: the menu above the files switches between them.
- Files: open folders and files, shown with syntax highlighting.
- History: the commits for the branch, or for the file or folder you're in.
- Blame: on a file, shows who last changed each line, linked to the change it came in with.
- Tags and Releases list every tag and release. See Releases and Pages.
- Download ZIP gets the code at that branch or tag (a
.tar.gzis offered too).
Commits signed with a key you've added show as Verified. See Signed commits.
Large files (Git LFS)
Fettlecode stores large files with Git LFS, using the same token as Git:
git lfs install
git lfs track "*.psd"
git add .gitattributes design.psd
git commit -m "Add the design file"
git push
The file's page offers the real file to download. Forks share their original's large files. One file can be up to 2 GB unless your admin has changed LFS_MAX_OBJECT_MB.
Searching code
Type in the search box in the top bar. It finds text in the default branch of every repository you can see, grouped by file with the matches highlighted, and lists repositories whose name or description match. You can:
- search one repository instead of all of them;
- tick Regular expression to search with one, such as
TODO\(\w+\); - match capitals exactly.