Has anyone tried or figured out how to import a gitorious repo into github? I already use github and wanted to see if there was a way to pull from a gitorious repo that I wanted to follow into github.
相关问题
- How to add working directory to deployment in GitH
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- Emacs shell: save commit message
- Can I organize Git submodules in a flat hierarchy?
相关文章
- 请教Git如何克隆本地库?
- java开发bug问题:GitHub授权登录无法获取授权账号信息?
- Is there a Github markdown language identifier for
- “no implicit conversion of Integer into String” er
- GitHub:Enterprise post-receive hook
- Git Clone Fails: Server Certificate Verification F
- SSIS solution on GIT?
- Is there a version control system abstraction for
How would this be different from the normal method of creating a repository on Github?
Github doesn't care where the repository came from in the first place, it just accepts whatever you push up to it.
The answers already given will just import master - if you want to import the entire repo including all branches, tags, etc, you need to do the following:
Clone the gitorious repo using the --bare flag - this preserves all branches/tags and doesn't create a working copy:
Change directory into the local repo:
Push the repo to github using the --mirror flag - this copies all branches, tags, history etc.:
Remove the local copy - you don't need it anymore and it's not much use for anything
Once you've done that, you can switch any local repos using the
git remote rm/add
commands as given above.Immediately after you create a new repository on GitHub, the website gives you 3 elegant personalized instruction sets. The 3 different options are:
If my username was user1 and the new repo was called project1, here is what it would say:
Existing Git Repo?
The previous answers are correct, but here's the step by step process including the missing step of delinking the local copy from Gitorious; without it, you'll get the error
fatal: remote origin already exists
when you try to add Github as the new origin.Commands:
You'll obviously need to substitute USER and REPO, and the last two commands are provided for you after step 1 when you create your Github repo.