Clone & Commit via Web
Clone, edit, commit, push and pull can be performed using Git directly from the command line, by using a Git client, or via the web interface. The former option is shown in the sections Clone & Commit via CLI. The latter option is detailed below.
The user in these examples is
knut the polar bear and its repository is
foobar. The repository was created via the Codeberg website including a
Cloning refers to the process of creating an identical copy of a repository to the local machine.
Copy the repo URL from the Codeberg website to your Git client using the
If you want to download a copy of a specific state of the repository, without its version history, click on the
Download Repositoryicon to download either as ZIP or TAR.GZ.
Click on the file you want to edit from the list of files in the repo. Let's try it here with the
The pencil tool (
Edit File) will open a new window.
There you can edit the file as you wish.
Preview tab shows you how the file will look like, and the
Preview Changes will highlight the changes to the file (red for deletions and green for additions).
A commit is a record of the changes to the repository. This is like a snapshot of your edits.
The commit section is at the bottom of the edit window:
A commit requires a commit message. A default message is added, but do not hesitate to edit it. Make sure your commit message is informative, for you, your collaborators and anyone who might be interested in your work. Some advice on how to write a good commit message can be found on countless websites and blogs!
If you intend to start a pull request with this commit, you should choose the option
Create a new branch for this commit and start a pull request. It will make it easier to work on the different commits without mixing them if they are in different forks. Check the documentation on Pull requests and Git flow for more details.
Submit your changes by clicking on
Synchronizing the modifications (commit) from the local repository to the remote one on Codeberg is called pushing.
Pulling synchronizes the modifications (commit) from the remote repository on Codeberg to the local one. Pulling is important when you work on different computers to make sure that all computers are on the same stage. It is even more important when you have collaborators on a project; they might change the files too, so you need to pull these modifications before you start working. Because of that, it is recommended to pull before pushing.
Pushing and pulling make sense only if you work locally. This is why there is no "push" or "pull" button on the Codeberg web interface; committing there already pushes to the remote repository on Codeberg, and there is therefore nothing to pull (except pull requests of course).
Hey there! 👋 Thank you for reading this article!
Is there something missing or do you have an idea on how to improve the documentation? Do you want to write your own article?
For an introduction on contributing to Codeberg Documentation, please have a look at the Contributor FAQ.
© Codeberg Docs Contributors. See LICENSE