Mot
Mot

Reputation: 29590

Git pull should ignore commits in unwanted branches

I'm using two local repositories/working trees for our project development:

Hence I don't need to switch between branches back and forth.
We only merge changes from the release branch to the master, but not the opposite.

Is it possible to configure my release-repository/working tree to not fetch changes from the master?

Upvotes: 1

Views: 456

Answers (1)

VonC
VonC

Reputation: 1327784

You could specify remote refspec for fetch, in order to only fetch what you want.
See:

I am not sure, however, that you can specify "fetch everything but xxx".

If you don't want to fetch anything from your first (master) repo, maybe configuring the fetch directive with a non-existing branch name will server just that purpose.

Upvotes: 3

Related Questions