Re: How can I access remote branches in a cloned repository on my local machine?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 20 Oct 2007, Erich Ocean wrote:

Our developer group has a shared git repository at git@xxxxxxxxxxxxxxxxx:dev.

Each developer has established their own local repository by running:

	 git clone git@xxxxxxxxxxxxxxxxx:dev
	 git config remote.origin.push master:refs/remotes/<username>/master

Each developer then does a `git pull` to update their master branch, merges their changes from their local topic branches, and then does `git push` to make the results available at git@xxxxxxxxxxxxxxxxx:dev.

As the integrator, I have then been ssh'ing into the git@xxxxxxxxxxxxxxxxx machine, cd'ing to "dev" and doing:

	git merge <username>/master

to incorporate their changes after running `git diff` to see what the changes are.

My own development repository is set up identically to the other developers.

What I would like to do now is clone the git@xxxxxxxxxxxxxxxxx:dev repository on my local machine a second time, checkout a <username>/master branch in that repository, and then use BBEdit's graphical diff to visually see the changes between my own repository and what another developer has pushed to the shared repository. I'll then merge them into my own developer repository and push that to the shared repository for the rest of the developers to pull from, so no longer will I merge by ssh'ing into the machine with the shared repository.

The problem is, when I clone git@xxxxxxxxxxxxxxxxx:dev, the various <username>/master's aren't there. I have tried a bunch of different ways, but they all give me errors. For example:

The default fetch refspec doesn't include the remotes - after all, you normally don't want the origin for your origin ...

How can I access remote branches in a cloned repository on my local machine?

Try something like:

git config remote.origin.fetch +refs/remotes/*:+refs/remotes/*
git fetch

--
Julian

 ---
No matter how cynical you get, it's impossible to keep up.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux