Re: [git-users] restrict history/messages on push?

2013-09-27 Thread Konstantin Khomoutov
On Wed, 25 Sep 2013 22:19:35 -0400
Tom Roche tom_ro...@pobox.com wrote:

[...]
 23rw4kf  23 Sep 2013 09:39  Foo?
 98bjttr  24 Sep 2013 12:34  Rollback! Bar.
 07657ab  25 Sep 2013 10:11  Arrggg! 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:
[...]

Another option is `git merge --squash` of 1495fcc (which is supposedly
a tip or a branch) into another branch into which this one is about to
be integrated.

-- 
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.


Re: [git-users] restrict history/messages on push?

2013-09-26 Thread Gergely Polonkai
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  Arrggg! 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.


Re: [git-users] restrict history/messages on push?

2013-09-26 Thread PJ Weisberg
On Sep 26, 2013 12:05 AM, Gergely Polonkai gerg...@polonkai.eu wrote:

 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.

This is exactly what I would recommend for Fred.  Keep in mind that Fred's
own private history will also have only the sanitized commits.  That
might be a good thing.

-- 
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.


Re: [git-users] restrict history/messages on push?

2013-09-26 Thread Tom Roche


https://groups.google.com/forum/#!topic/git-users/nzwVr5li3cM
 Tom Roche
 How to restrict the commit history or messages that get pushed to a remote 
 repository?

...

 Gergely Polonkai
...
 git rebase -i[.] Before pushing, rebase on the last public commit, and 
 edit/squash the unnecessary commits.

...

 Peter J Weisberg
...
 Keep in mind that Fred's own private history will [then] also have only the 
 sanitized commits.

Thanks for the tips! I had not previously understood why one would want to use 
`git rebase` instead of `git merge`, when the latter seems more 
straightforward. I should have read to the end of the page:

http://git-scm.com/book/en/Git-Branching-Rebasing
 treat rebasing as a way to clean up and work with commits before you push 
 them,
 and [only] rebase commits that have never been available publicly

Fortunately I have not needed this, but I'll recommend it to more 
commit-challenged colleagues.

thanks again, 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.


[git-users] restrict history/messages on push?

2013-09-25 Thread Tom Roche

[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  Arrggg! 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.