You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: book/09-git-and-other-scms/sections/import-bzr.asc
+29-43Lines changed: 29 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,7 @@ So in this case you have nothing to do.
55
55
56
56
At this point, the way to import a Bazaar repository differs according to that you have a single branch or you are working with a repository that has several branches.
57
57
58
+
58
59
===== Project with a single branch
59
60
60
61
Now `cd` in the directory that contains your Bazaar repository and initialize the Git repository:
Now `git branch` shows you the `master` branch as well as the `work` branch.
150
109
Check the logs to make sure they’re complete and get rid of the `marks.bzr` and `marks.git` files.
151
110
152
-
Your working copy is still unsynchronized, so let's reset it:
153
111
112
+
===== Synchronize the staging area
113
+
114
+
Whatever the number of branches you had and the import method you used, your staging area is not synchronized with HEAD, and with the import of several branches, your working directory is not synchronized neither.
115
+
This situation is easily solved by the following command:
154
116
[source,console]
155
117
----
156
118
$ git reset --hard HEAD
157
119
----
158
120
121
+
122
+
===== Ignore the files that were ignored with .bzrignore
123
+
124
+
Now let us have a look at the files to ignore.
125
+
As `.bzrignore`'s format is completely compatible with `.gitignore`'s format, the simplest is to rename your `.bzrignore` file.
126
+
You will also have to create a commit that contains this change for the migration:
127
+
[source,console]
128
+
----
129
+
$ git mv .bzrignore .gitignore
130
+
$ git commit -am 'Migration from Bazaar to Git'
131
+
----
132
+
133
+
134
+
===== Send your repository to the server
135
+
136
+
Here we are!
137
+
Now you can push the repository onto its new home server:
0 commit comments