Reputation: 11
I have a clearcase repository and I am planning to move it to git. Is there a way I can dump all the history?
Upvotes: 1
Views: 1115
Reputation: 1323883
In addition to my old answer "ClearCase to Git migration" (2014), and by contrast with the 2016 "Git - ClearCase methodology", I would add (2016):
You need to check:
Only labelled (or baselined) ClearCase versions can be safely imported into a git repo, as they are similar to git commits.
The other approach is to actually dump the history (ie not keep it in the new git repo), keep said history in ClearCase (in read-only mode for archive).
Then the solution is simple: go to a ClearCase snapshot view, do a git init .
, then git add .
, git commit -m "first import"
.
You can the add a remote (to an empty bare repo), push and you are done.
git remote add origin /url/to/bar/repo
# for instance
git remote add origin https://github.com/<user>/<repo>
# or an internal server to your company
git remote add origin https://mycompany.com/gitlab/<project>/<repo>
git push -u origin master
Upvotes: 1