Uwe Brauer <
o...@mat.ucm.es> writes:
> Use a git branch with the same name later.
>
> I have not much idea about git, but it seems that the following is
> possible in git.
>
> After some commits you merge say the feature branch into master.
>
> Then you continue hacking and pushing to the master branch
>
> At some later point in the feature you create again a feature branch for
> hacking, that is however a new branch.
>
> What will happen if I pull from such a git repository
You can do the same in Mercurial, but you have to force it: Mark the
branch as closed (with hg commit --close-branch), then merge it. Later
re-use the name.
cd /tmp
hg init closing
cd closing/
echo 1 > 1
hg ci -Am 1
echo 2 > 2
hg ci -Am 2
hg ci --close-branch -m close
hg up default
hg merge feature
hg ci -m merge
echo 3 > 3
hg ci -Am 3
# force creation of a same-named branch
hg branch feature --force
echo 4 > 4
hg ci -Am 4p
hg ci -Am 4 --amend
hg up default
echo 5 > 5
hg ci -Am "5 on default"
hg log -G
@ changeset: 7:5cfc355ea3a6
| tag: tip
| parent: 4:9abef3e9071d
| user: Arne Babenhauserheide <
arne...@web.de>
| date: Sun Nov 28 11:19:20 2021 +0100
| summary: 5 on default
|
| o changeset: 6:543b73f6bac5
|/ branch: feature
| parent: 4:9abef3e9071d
| user: Arne Babenhauserheide <
arne...@web.de>
| date: Sun Nov 28 11:17:55 2021 +0100
| summary: 4
|
o changeset: 4:9abef3e9071d
| user: Arne Babenhauserheide <
arne...@web.de>
| date: Sun Nov 28 11:17:08 2021 +0100
| summary: 3
|
o changeset: 3:7ab1c92c0a0b
|\ parent: 0:d7d8dc2e9e63
| | parent: 2:02f5c584ebce
| | user: Arne Babenhauserheide <
arne...@web.de>
| | date: Sun Nov 28 11:17:00 2021 +0100
| | summary: merge
| |
| _ changeset: 2:02f5c584ebce
| | branch: feature
| | user: Arne Babenhauserheide <
arne...@web.de>
| | date: Sun Nov 28 11:16:49 2021 +0100
| | summary: close
| |
| o changeset: 1:d1d68b7a26f7
|/ branch: feature
| user: Arne Babenhauserheide <
arne...@web.de>
| date: Sun Nov 28 11:16:37 2021 +0100
| summary: 2
|
o changeset: 0:d7d8dc2e9e63
user: Arne Babenhauserheide <
arne...@web.de>
date: Sun Nov 28 11:16:12 2021 +0100
summary: 1
Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de