Hello,

first of all, Fred should stop using such commit messages :-)

Seriously speaking, I think that's where git rebase -i comes in. Before
pushing, rebase on the last public commit, and edit/squash the unnecessary
commits.

Cheers,
Gergely
On 26 Sep 2013 04:19, "Tom Roche" <tom_ro...@pobox.com> wrote:

>
> [caution: contains ASCII table, best viewed in monospace]
>
> How to restrict the commit history or messages that get pushed to a remote
> repository? What I mean:
>
> Suppose a group wants to have a remote public repository (e.g., on
> github), but its developers do not want their commit behavior and messages
> to be fully publicly visible. (Paranoid, I know, but these are real
> people.) Is there a way such a group could show only (for want of a better
> term) "push events" on the public remote? For example:
>
> Suppose developer Fred makes the following commits to his private repo:
>
> ----------------------commit-------------------------
> ID       date/time          message
> -------  -----------------  -------------------------
> 23rw4kf  23 Sep 2013 09:39  Foo?
> 98bjttr  24 Sep 2013 12:34  Rollback! Bar.
> 07657ab  25 Sep 2013 10:11  Arrggghhhh! Baz.
> 1495fcc  25 Sep 2013 23:45  Self-serving explanation.
>
> Fred wants to push 1495fcc to the public repo, but doesn't want manager
> Ethel (or anyone else) to see commits=[23rw4kf, 98bjttr, 07657ab], much
> less those commit messages. Fred wants one of two options:
>
> 1. That only commit ID=1495fcc and its message to be visible on the public
> remote post-push.
>
> 2. For the code from commit ID=1495fcc to show on the public remote as a
> separate event, with a separate message.
>
> As a git beginner, the only option that seems feasible to me is a
> variation on option 2. Fred would maintain 2 private repos: one for "normal
> development," and one reserved for use with the public remote. When he
> wanted to push to public, Fred would
>
> 2.1. copy code from his "real" dev repo to the second,
> public-remote-linked repo
> 2.2. make a separate, aggregate commit (with a separate message) to that
> second repo
> 2.3. push from the second repo to the public remote
>
> This seems painful, and maybe that's what Fred deserves. But I'm
> wondering, is there a way to accomplish Fred's objective more easily?
>
> TIA, Tom Roche <tom_ro...@pobox.com>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Git for human beings" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to git-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to