Git development
 help / color / mirror / Atom feed
From: Lasse Kliemann <lasse@lassekliemann.de>
To: git@vger.kernel.org
Subject: Re: Easy Non-Fast-Forward Pushes
Date: Sun, 01 Mar 2015 12:08:46 +0100	[thread overview]
Message-ID: <ygeioel2cw1.fsf@lassekliemann.de> (raw)
In-Reply-To: <CAGZ79kZ3_ohE6ebY5MvOk6+QfChppR_OtcmVaw5LBoutTWm3ZA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1705 bytes --]

Stefan Beller <sbeller@google.com> writes:

> So maybe you create a bash alias for
> alias gitup='git push origin HEAD:${USER}/$(date -Iseconds)'
> which would push your current tip of the repository to the remote with
> quite a unique name.
>
> Then you could also do a "git commit -a && gitup" to push your changes
> to the server
> As the integrator you could then integrate branches with
>     "git fetch origin && git merge origin/sbeller/2015-02-27T09:34:47-0800"
>
> So it is doable. Though I am not convinced of the workflow.

This solution is not too bad, I thought, but there should be a way to
remove those branches once I have integrated them. Otherwise the
repository might get cluttered, and I found that those branches are
particularly annoying when viewing a graphical representation of the
commit graph.

Deleting is possible, using 'git push origin :BRANCH'. But then, anyone
with pushing capabilities could do this! I don't like the possibility of
one team member messing up another's commit, be it on purpose or
accidentally.

In Gitlab, branches can be protected. For this to work, however, I would
need fixed names. So I would assign one branch to each team member, make
those branches (let's call them "personal branches" for now) protected,
and then configure their systems (by shell aliases, scripts, ...) to the
following:

1. Try pushing to origin/master. If it works, fine. If not, goto 2.

2. Push to the appropriate personal branch.

This system does not prevent someone pushing to another's personal
branch, thereby possibly making a fast-forward push impossible. So step
number 2 may fail due to this, but this might be an acceptable risk.

Thanks a lot for your thoughts.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 835 bytes --]

  reply	other threads:[~2015-03-01 18:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-27 16:20 Easy Non-Fast-Forward Pushes Lasse Kliemann
2015-02-27 17:40 ` Stefan Beller
2015-03-01 11:08   ` Lasse Kliemann [this message]
2015-03-05  1:42     ` Junio C Hamano
2015-02-27 19:08 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ygeioel2cw1.fsf@lassekliemann.de \
    --to=lasse@lassekliemann.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox