'How to push a new development branch to a mirrored gitea repository?

It seems can't push commits to a new branch to a mirror repository without setting push to upstream. I created a mirror repository in gitea, it synchronizes from a GitHub repository period. I cloned the gitea repository to my local and created a new branch. Now I want to push the new branch to gitea, it reports that the remote repository is read-only. "remote: mirror repository is read-only" Does it mean that it can't push to a mirrored repository and the only way is to convert the repository to a normal one?



Solution 1:[1]

current branch all file over-write with target branch

`git merge <branch-name>`

change branch to branch name

`git checkout <branch-name>`

remove all change merge from new branch

`git merge --abort`

fetch new branch

`git pull origin <Remote-branch-name>:<Local-branch-name>`

fetch all changes from remote branch into local current branch

`git pull origin <branch-name>`

delete local branch

`git branch -d <branch-name>`

alert (do not use this) first use use 'git merge --abort'

`git branch -D <branch-name>`

rename local branch

`git branch -m <branch-name>`

delete remote branch

`git push origin --delete <branch-name>`

undo the most recent local commit in Git? Delete files related to commit

git reset --hard HEAD~1

and So, on

git reset --hard HEAD~2
git reset --hard HEAD~3
git push origin +HEAD^:Branch_name

undo most recent local commit But not delete files

git reset HEAD~1
for last two commit
git reset HEAD~2

Remove last commit from remote git repository

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1