@@ -102,15 +102,14 @@ see linkgit:git-pull[1] for details.
102
102
103
103
Git can also be used in a CVS-like mode, with a central repository
104
104
that various users push changes to; see linkgit: git-push [ 1] and
105
- link : cvs -migration.html [ git for CVS users ] .
105
+ linkgit : gitcvs -migration[ 1 ] .
106
106
107
107
108
108
### Public git repositories ###
109
109
110
110
Another way to submit changes to a project is to tell the maintainer
111
111
of that project to pull the changes from your repository using
112
- linkgit: git-pull [ 1] . In the section "<<getting-updates-with-git-pull,
113
- Getting updates with git-pull>>" we described this as a way to get
112
+ linkgit: git-pull [ 1] . This is a way to get
114
113
updates from the "main" repository, but it works just as well in the
115
114
other direction.
116
115
@@ -155,10 +154,9 @@ like this:
155
154
156
155
### Pushing changes to a public repository ###
157
156
158
- Note that the two techniques outlined above (exporting via
159
- <<exporting-via-http,http>> or <<exporting-via-git,git>>) allow other
157
+ Note that exporting via http or git allow other
160
158
maintainers to fetch your latest changes, but they do not allow write
161
- access, which you will need to update the public repository with the
159
+ access. For this, you will need to update the public repository with the
162
160
latest changes created in your private repository.
163
161
164
162
The simplest way to do this is using linkgit: git-push [ 1] and ssh; to
@@ -172,11 +170,10 @@ or just
172
170
$ git push ssh://yourserver.com/~you/proj.git master
173
171
174
172
As with git-fetch, git-push will complain if this does not result in a
175
- << fast-forwards,fast forward>> ; see the following section for details on
173
+ fast forward; see the following section for details on
176
174
handling this case.
177
175
178
- Note that the target of a "push" is normally a
179
- <<def_bare_repository,bare>> repository. You can also push to a
176
+ Note that the target of a "push" is normally a bare repository. You can also push to a
180
177
repository that has a checked-out working tree, but the working tree
181
178
will not be updated by the push. This may lead to unexpected results if
182
179
the branch you push to is the currently checked-out branch!
@@ -199,7 +196,7 @@ details.
199
196
200
197
### What to do when a push fails ###
201
198
202
- If a push would not result in a << fast-forwards,fast forward>> of the
199
+ If a push would not result in a fast forward of the
203
200
remote branch, then it will fail with an error like:
204
201
205
202
error: remote 'refs/heads/master' is not an ancestor of
@@ -210,10 +207,8 @@ remote branch, then it will fail with an error like:
210
207
This can happen, for example, if you:
211
208
212
209
- use `git-reset --hard` to remove already-published commits, or
213
- - use `git-commit --amend` to replace already-published commits
214
- (as in <<fixing-a-mistake-by-rewriting-history>>), or
215
- - use `git-rebase` to rebase any already-published commits (as
216
- in <<using-git-rebase>>).
210
+ - use `git-commit --amend` to replace already-published commits, or
211
+ - use `git-rebase` to rebase any already-published commits.
217
212
218
213
You may force git-push to perform the update anyway by preceding the
219
214
branch name with a plus sign:
@@ -223,7 +218,6 @@ branch name with a plus sign:
223
218
Normally whenever a branch head in a public repository is modified, it
224
219
is modified to point to a descendant of the commit that it pointed to
225
220
before. By forcing a push in this situation, you break that convention.
226
- (See <<problems-with-rewriting-history >>.)
227
221
228
222
Nevertheless, this is a common practice for people that need a simple
229
223
way to publish a work-in-progress patch series, and it is an acceptable
@@ -233,8 +227,7 @@ intend to manage the branch.
233
227
It's also possible for a push to fail in this way when other people have
234
228
the right to push to the same repository. In that case, the correct
235
229
solution is to retry the push after first updating your work: either by a
236
- pull, or by a fetch followed by a rebase; see the
237
- <<setting-up-a-shared-repository,next section>> and
230
+ pull, or by a fetch followed by a rebase; see the next section and
238
231
linkgit: gitcvs-migration [ 7] for more.
239
232
240
233
[ gitcast: c8-dist-workflow ] ("GitCast #8 : Distributed Workflow")
0 commit comments