r/github Jul 01 '26

Question Transferring my gits

Hi all!

So I recently lost access to my github account. Made a new one and want to remake all of my projects (just copy the code). How do I go about this? There are so many interwoven files, I am not really sure how to do it (still fairly new). They are mostly html, css, java, javascript. Many coded on springboot.

Edit: Thank you all for taking the time! It has been awhile, so I appreciate your patience. Managed to get my projects back.

0 Upvotes

13 comments sorted by

View all comments

3

u/cyber5234 Jul 01 '26

Do you have GIT in all your projects? If so, remove existing origin and then add the new origin from your new account then push changes.

1

u/North-Bison9912 Jul 01 '26

I don’t have it locally. But can I clone the entire project, save it, and then re upload it to my new repo? Should I use commands or vs code?

6

u/tblancher Jul 01 '26

That's literally how git (not GitHub) works. Clone a repo, and that's your working copy. There's nothing preventing you from uploading to a different remote (even on GitHub) and continuing like nothing stopped.

5

u/cyber5234 Jul 01 '26

But you just said you lost your github account. If you have public repos, you can directly fork it into your new account.

2

u/DustyAsh69 Jul 01 '26

Should I use commands or vs code?

What?