# receive.denyCurrentBranch that allows pushing data, just not changing branch

2 messages from 2019-05-25 to 2019-05-25. Participants: Shawn Landden, Ævar Arnfjörð Bjarmason.
Thread: https://gitlist.dev/t/51177

## Shawn Landden, 2019-05-25 21:48

Subject: receive.denyCurrentBranch that allows pushing data, just not changing branch
Message-ID: <CA+49okox4CfSWgQrdAYrM=R3ZNThWgkEY9RZtDzOMxAVs5b7Dw@mail.gmail.com>
URL: https://gitlist.dev/e/CA%2B49okox4CfSWgQrdAYrM%3DR3ZNThWgkEY9RZtDzOMxAVs5b7Dw%40mail.gmail.com

```
It would be nice if when pushing to a checked out repo you could get
up git to still push the commits, just not update the branch's HEAD.

-Shawn Landden

```

## Ævar Arnfjörð Bjarmason, 2019-05-25 23:39

Subject: Re: receive.denyCurrentBranch that allows pushing data, just not changing branch
Message-ID: <875zpyf6ip.fsf@evledraar.gmail.com>
URL: https://gitlist.dev/e/875zpyf6ip.fsf%40evledraar.gmail.com
In-Reply-To: <CA+49okox4CfSWgQrdAYrM=R3ZNThWgkEY9RZtDzOMxAVs5b7Dw@mail.gmail.com>

```

On Sat, May 25 2019, Shawn Landden wrote:

> It would be nice if when pushing to a checked out repo you could get
> up git to still push the commits, just not update the branch's HEAD.

How would this proposed feature differ from what
receive.denyCurrentBranch=false does now?

You have a commit X in a non-bare repo. Your checkout is checked-out to
X, your index has X's content in it, and the branch reference is at X.

Now you push Y to the branch reference, what would you like to have
happen to the checkout & index at this point?

```
