Table of Contents |
---|
Preparing Git repository
Create new Git repository on gforge6
- Go to http://gforge6.eufus.eu/gf/project
- Press "Add New Project" button
- Fill project data - in the Temple project section select "Basic project with GIT support"
- Press "Submit" button
- Wait a moment (max. 10 minutes). Gforge will create a git repository for you
Create a repository git in an existing project (only for project administrators)
- Go to existing project on http://gforge6.eufus.eu/gf/project
- Open "Admin" tab
- Change "scm:" to "GIT"
- Press "Submit" button
- Wait a moment (max. 10 minutes). Gforge will create an empty git repository
Warning |
---|
SVN repository still exists! |
Migrating to Git
The section is based on: https://git-scm.com/book/en/v2/Git-and-Other-Systems-Migrating-to-Git
...
Code Block |
---|
schacon = Scott Chacon <schacon@geemail.com> selse = Someo Nelse <selse@geemail.com> |
Warning |
---|
If your users.txt file contains no entries |
To get a list of the author names that SVN uses, you can run this:
...
Create git branches and tags
Warning |
---|
Remember to load the git module to use the git svn feature |
You can provide this file to git svn
to help it map the author data more accurately. You can also tell git svn
not to include the metadata that Subversion normally imports, by passing --no-metadata
to the clone
or init
command (though if you want to keep the synchronisation-metadata, feel free to omit this parameter). This makes your import
command look like this:
Code Block |
---|
$ git svn clone https://<USERNAME>@gforge6gforge-next.eufus.eu/svn/<SVN_PROJECT_NAME>/ \ --authors-file=users.txt --no-metadata --prefix "" -s my_project $ cd my_project |
...
Info | ||
---|---|---|
| ||
If your SVN repository doesn’t have a standard layout, you need to provide the locations of your trunk, branches, and tags using the
|
Warning |
---|
In case you consider the current layout of your SVN/Git repository more elaborate than usual (convoluted /tags, /trunk and /branches or heavily reliant on externals), please contact the ACH team to get some assistance on the migration. |
You should also do a bit of post-import cleanup. For one thing, you should clean up the weird references that git svn
set up. First you’ll move the tags so they’re actual tags rather than strange remote branches, and then you’ll move the rest of the branches so they’re local.
...
You can easily browse the new repository using gitk command:
Code Block |
---|
$ gitk --all |
Prepare new project
- Log in to https://gitlab.eufus.psnc.eu/dashboard/projects
- Press button "New project"
- Choose "Create blank project"
- Fill in the project form
- Disable option Initialize repository with a README
- Press button "Create project"
Send changes to new Git repository
...
Code Block |
---|
$ git remote add origin https://<USERNAME>@gforge6gitlab.eufus.psnc.eu/gitpl/<YOUR_GITLAB_USERNAME>/<GIT_PROJECT_NAME> |
Because you want all your branches and tags to go up, you can now run this:
...
Info | ||
---|---|---|
Password is needed to access remote git repositories.
|
...