You can back up a branch in your repository by adding an SSH command that will trigger the upload of the newest version to a server after every push to that branch. Here’s how:
Execute the following on the server where you want to keep the data:$ mkdir backup$ cd backup$ git clone --mirror repo_url_ssh
Open the project that you want to backup and go to Pipelines
Add a new pipeline in the automatic mode and add the SSH action
Provide the details of your server and set “backup/repo” as the working directory
In the command field type the following:$ git remote update
Once you save, the backup will be performed automatically on every push to the branch.