1 Code hosting
Anthony Wang edited this page 2024-03-01 02:22:51 +00:00

Hello there, exozyme user! Whether you have experience with programming or not, you've probably heard of Forgejo. It's an easy-to-use frontend for Git, a popular version control system for code (+ more!). This also covers some basic knowledge of Git itself.

1. Getting started

Firstly, you'll want to travel to git.exozy.me. Click the "Sign in" button at the top right, and input your exozyme login. This login will be the same for all services and shell access. After logging in, you should see a clean interface that shows repositories, user/repo actions and a commit graph at the top. Some of these features may be blank if you don't follow users or watch repositories, but we can cover that later.

2. Your first repository

Assuming you want to start a project of your own, whether it's code-based or a documentation-centered project, it can all be done very easily. Next to your profile picture on the top right, you'll see a plus icon. Press it and click "New repository". You will then be asked some information on the new repository, like the name, a description, and more.

For this guide we'll just make a repository called test-repo. You can also check the option to make it a private repository, if you don't want other users to look at your project. After this, we'll have an empty repository (unless you clicked the option to initialize it with a README and license).

The best way to get started is to open up a terminal (or better yet, SSH into exozyme!) and clone your repository. A simple git clone https://git.exozy.me/myuser/myrepo should do. If you like, you can set up an SSH key and add it to your Forgejo account to easily clone and push without using a password.

3. git commit

Once you've cloned your repository, cd into it and create a file. This can be named whatever you want. Once it's there and has some cool content, run git add --all. This will tell Git to collect all your files and get ready for actions like a commit. Commiting in Git is basically creating new versions of your project, allowing you to see who made changes, when they did, and what exactly the changes were.

To commit your changes, run git commit -m "Commit message here". The part in quotes is arbitrary and you can put anything you want there, but make sure to keep it short and preferably relevant to the commit. Most users will briefly say what they changed, and sometimes put a timestamp to easily see the time it was made, though Git does this automatically.

Now that you've made your first commit, run git log to view it. This will show your name, email and timestamp, as well as the commit message and an ID for the commit. Once you're happy, get it on the web!

4. Pushing to Forgejo

When you're satisfied with your commits, you should push them to Forgejo so others can see your changes and comment on them. Generally, git push should do the job. You may be prompted for a username and password. Sometimes this doesn't suffice, and you have to add the remote origin. First run git remote add origin https://git.exozy.me/myuser/myrepo.git, then run git push -u origin main. Replace the required info in the first command to fit your repository. Now that you've pushed it, head to the URL and you'll be able to see the changes!

5. Pull requests

If you'd like to contribute to another person's repo or exozyme repos, you can make a pull request. The process is simple: fork the repo, make changes and push commits, then click the new pull request button and write a description of your changes.