How to export an existing git private project(earlier hosted on github) from localbox to gitlab?

StackOverflow https://stackoverflow.com/questions/22436896

I have project in my localbox which was version controlled with Git and it was hosted on Github. If that project was a private one and I was one of the collaborators then(not any more a collaborator now as a result the import feature in Gitlab to clone an existing github repo won't work in my case and I'm not even sure if it is supposed to work for private github projects for which one has only a collaborator access).

If I'd like to push all my commits wrt that project(through what I have with me on my localbox) to a private repo on Gitlab so that I can easily traceback my work done(in terms of my commits, pull requests, commets etc.,) wrt that project is there a way I can do so using Git and Gitlab? If yes, please let me know the steps involved.

Thank you.

有帮助吗?

解决方案

You can simply remove the remote origin that points to github and replace it with a new one

git remote rm origin git remote add origin yourGitLabRepoURL/project git push origin master

Source: http://git-scm.com/docs/git-remote

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top