Download a zip archive of a remote Git repository (be it a gogs one, or any other remote hosting service), means downloading a snapshot view of the default HEAD.
There is no history.
The history you have created by initializing a local repository in it, and creating a branch, has no common base with the one from the original remote repository.
If you want to push back your local branch, you need first to:
- clone the repository
- add your local repo as a remote to the official cloned one, and fetch
- create a new branch
- cherry-pick from the fetched branch to the new branch (and you can cherry-pick in one command a range of commits)
- push back the new branch (which will work, since you are pushing from an actual clone)
That is:
cd /path/to/local/repo
cd ..
git clone https://gogs/me/myRepo myClone
cd myClone
git are remote repo ../repo
git fetch repo
git switch -c newBranch
git cherry-pick repo/localBranch~n..repo/localBranch
git push -u origin newBranch
In "repo/localBranch~n
", replace "n
" by the number of commits you had created in your local branch.