# git branches 5.3/ 5.4 / 5.5

- Thread: https://externals.io/message/68536
- Original archive: https://news-web.php.net/php.internals/68536
- Started by johannes@schlueters.de on 2013-08-15T17:55:35+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #68536 — johannes@schlueters.de — 2013-08-15T17:55:35+00:00

URL: https://externals.io/message/68536#68536

Hi,

there were branches with the names
   5.3
   5.4
   5.5
in our main repository. This was confusing with PHP-5.x which we use. As
those where full merged they were most likely pushed by accident. I have
deleted them from the repo.

Important: To ensure you don't push them by accident please run this
command to delete them from your local clone:

$ git branch -d 5.3 5.4 5.5
Deleted branch 5.3 (was 15b554c).
Deleted branch 5.4 (was bcdac75).
Deleted branch 5.5 (was 4c76215).

In case you committed anything to those branches the operation will fail
and you can preserve those changes.

I have archived those branches under the branch names backup5.[345] on
my github clone:
  https://github.com/johannes/php-src/tree/backup5.3
  https://github.com/johannes/php-src/tree/backup5.4
  https://github.com/johannes/php-src/tree/backup5.5

johannes

---

## #68537 — Jordi Boggiano — 2013-08-15T18:19:20+00:00

URL: https://externals.io/message/68536#68537 · In reply to: #68536

> Important: To ensure you don't push them by accident please run this
> command to delete them from your local clone:
> 
> $ git branch -d 5.3 5.4 5.5
> Deleted branch 5.3 (was 15b554c).
> Deleted branch 5.4 (was bcdac75).
> Deleted branch 5.5 (was 4c76215).

And to ensure you never push garbage by accident, run this to tell git
to always only push the branch you're on when you run `git push`:

    git config --global push.default current

Cheers

-- 
Jordi Boggiano
@seldaek - http://nelm.io/jordi

---

## #68538 — johannes@schlueters.de — 2013-08-15T18:45:56+00:00

URL: https://externals.io/message/68536#68538 · In reply to: #68537

> 
> And to ensure you never push garbage by accident, run this to tell git
> to always only push the branch you're on when you run `git push`:
> 
>     git config --global push.default current

Good tip. I wasn't aware of that setting. Mind that we have multiple
active branches we typically push to in one go, so using the default and
being clear about ones tracking branches can be comfortable, too, and
avoid forgetting to properly push to all branches.

So each approach has benefits and downsides ... and well as I'm the only
one who currently can do forced pushes (I think) neither approach will
cause actual trouble ;-) (if it becomes bad, which I don't expect, we
can add restrictions to the server, too)


Probably the best is to do a push --dry-run to check and getting used to
manually specify branches i.e.
    git push origin PHP-5.4 PHP-5.5 master

johannes

---

## #68539 — Anatol Belski — 2013-08-15T19:30:27+00:00

URL: https://externals.io/message/68536#68539 · In reply to: #68538

> 
>
> > […]
>
> Good tip. I wasn't aware of that setting. Mind that we have multiple
> active branches we typically push to in one go, so using the default and
> being clear about ones tracking branches can be comfortable, too, and
> avoid forgetting to properly push to all branches.
>
> So each approach has benefits and downsides ... and well as I'm the only
> one who currently can do forced pushes (I think) neither approach will
> cause actual trouble ;-) (if it becomes bad, which I don't expect, we can
> add restrictions to the server, too)
>
>
> Probably the best is to do a push --dry-run to check and getting used to
> manually specify branches i.e. git push origin PHP-5.4 PHP-5.5 master
>
> johannes
>
>

Exactly, I usually do just 'git push origin' while being on master, so if
there's some stuff merged up from PHP-5.4 (or PHP-5.3 earlier), it
automatically goes with. The experimental branches will not be pushed with
this until one explicitly tells like 'git push origin my_experiment'.
Using that current setting would disable the automatic.

Anatol

Anatol
