Skip to content

Commit 28ea67e

Browse files
committed
Merge commit 'origin/master'
2 parents 4cb92a7 + 2708567 commit 28ea67e

File tree

1 file changed

+10
-17
lines changed

1 file changed

+10
-17
lines changed

text/11_Distributed_Workflows_Clone_Fetch_Push/0_ Distributed_Workflows_Clone_Fetch_Push.markdown

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,14 @@ see linkgit:git-pull[1] for details.
102102

103103
Git can also be used in a CVS-like mode, with a central repository
104104
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].
106106

107107

108108
### Public git repositories ###
109109

110110
Another way to submit changes to a project is to tell the maintainer
111111
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
114113
updates from the "main" repository, but it works just as well in the
115114
other direction.
116115

@@ -155,10 +154,9 @@ like this:
155154

156155
### Pushing changes to a public repository ###
157156

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
160158
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
162160
latest changes created in your private repository.
163161

164162
The simplest way to do this is using linkgit:git-push[1] and ssh; to
@@ -172,11 +170,10 @@ or just
172170
$ git push ssh://yourserver.com/~you/proj.git master
173171

174172
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
176174
handling this case.
177175

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
180177
repository that has a checked-out working tree, but the working tree
181178
will not be updated by the push. This may lead to unexpected results if
182179
the branch you push to is the currently checked-out branch!
@@ -199,7 +196,7 @@ details.
199196

200197
### What to do when a push fails ###
201198

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
203200
remote branch, then it will fail with an error like:
204201

205202
error: remote 'refs/heads/master' is not an ancestor of
@@ -210,10 +207,8 @@ remote branch, then it will fail with an error like:
210207
This can happen, for example, if you:
211208

212209
- 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.
217212

218213
You may force git-push to perform the update anyway by preceding the
219214
branch name with a plus sign:
@@ -223,7 +218,6 @@ branch name with a plus sign:
223218
Normally whenever a branch head in a public repository is modified, it
224219
is modified to point to a descendant of the commit that it pointed to
225220
before. By forcing a push in this situation, you break that convention.
226-
(See <<problems-with-rewriting-history>>.)
227221

228222
Nevertheless, this is a common practice for people that need a simple
229223
way to publish a work-in-progress patch series, and it is an acceptable
@@ -233,8 +227,7 @@ intend to manage the branch.
233227
It's also possible for a push to fail in this way when other people have
234228
the right to push to the same repository. In that case, the correct
235229
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
238231
linkgit:gitcvs-migration[7] for more.
239232

240233
[gitcast:c8-dist-workflow]("GitCast #8: Distributed Workflow")

0 commit comments

Comments
 (0)