On Fri, Nov 14, Andreas Schwab wrote:

> Olaf Hering <o...@aepfle.de> writes:
> 
> > Even if I do a fresh clone with --bare, the result can not be updated
> > anymore with git fetch. What I'm doing wrong?
> 
> A --bare clone has no connection to its origin (there are no remotes).
> You want a --mirror.

Using --mirror for this purpose is dangerous because it will most likely
overwrite changes on the remote side. Fortunately I used 'git push --dry-run
origin' and the output was like:

To git://host/repo.git
 + abbrev1..abbrev2 branchA -> branchA (forced update)

Before that I pushed already to the remote repo without realizing where the
push goes to.

Looks like using the --bare option for cloning the master and then doing
something like "git clone --origin local_bare -b branchA --reference
repo-master git://host/repo.git repo-branchA" will work better.

Olaf
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to