I did this migration a little while back. Many people have decided to
move since. Here's some detail of how I did it.
Why move? You probably know why already, though for quite a few
people it seems to have been the "CEO" doubling down on insisting that
everyone must use genAI, then being sacked for not being pro-genAI
enough and the whole operation being rolled under Microsoft's AI
division. I don't want the legal exposure of having my code
potentially tainted by genAI-driven content, which is very likely to
be a violation of the licences under which I wish to release it. I
have no wish to support Microsoft's openwashing operation even by my
participation. (Also, they still have no IPv6 connectivity.)
Why move to Codeberg? The participatory governance model, i.e. it's
not just waiting to sell out and make the next billionaire. I could
host Forgejo myself, and eventually I probably will, but for something
like this that's not immediately essential to me I'm happy to use a
third party.
Anyway, here's what I did.
Log into Github.
Create a "Personal Access Token (classic)": (profile picture),
Settings, Developer Settings, Personal Access Tokens, Tokens
(Classic), Generate New Token (classic).
Log into Codeberg.
Everything from this step on is per repository. If like me you have a
local copy as well as the public one on Github, make sure they're up
to date with each other first.
Create, New Migration, Github.
Paste in the GitHub URL, then the access token, and set repository
name and anything else that's needed. The Codeberg repository gets
created automatically.
I then removed all files in the the Github repostiory and replaced its
README with this:
This software has moved to
https://codeberg.org/...
See https://sfconservancy.org/GiveUpGitHub/ for why.
There are probably many other links you could leave there. Commit and
push.
Under the repository's settings page on Github, I then Archived the
repository to make it clear there would be no further updates there.
Then I just needed to set up new git remotes in my local copies of
projects. That comes down to:
git remote -v |grep github
to get the old remote name I was using.
git remote remove
(whatever that name was)
git remote add codeberg git@codeberg.org:USERNAME/REPOSITORY.git
I didn't have any issues, pull requests, etc., to migrate so I didn't
need to test those things.
The only active code left on my Github repository is the copies of
other projects required when submitting pull requests to them.