Hacker Newsnew | past | comments | ask | show | jobs | submit | jacknagel's commentslogin

>But then I found that that email address is shared to the whole world in git commit summary!

If you're talking about the email address in the commit itself, that's part of the commit object and not anything GitHub does behind your back. If you publish the commit anywhere, not just GitHub, the email address has become public knowledge.


"Set up git" instructions tell this:

  git config --global user.name "Your Name"

  git config --global user.email user4325434@mailinator.com
You have to use same email as in registration or else it won't push.


Nope. Authentication is done using your ssh key pair.

All my commits are done by noreply@example.com, but that is obviously not my Github email on either my personal or work accounts.


You might find `git add -N` ("--intent-to-add") useful. It's an extra step, yes, but it allows you to e.g. view the content of new files with `git diff` without actually staging the content for commit, and will allow you to stage that file during `git add -p`.


HISTIGNORE=ssh

It won't strip existing lines, but will prevent them from being recorded in the future.


Sorry, should be

    HISTIGNORE=ssh*
(the pattern has to match the entire line.)

Like many shell variables, this one is a colon-separated list.


IIRC (I read the git mailing list) there was a lot of arguing about whether generation numbers should be in the commit headers or stored in separate cache, and then a different fix went in to speed up "tag --contains" and the discussion was pretty much abandoned.


Does anyone know how to adjust the line height?

In 1.x I could do

    defaults write com.macromates.TextMate OakLineHeightDelta n
but 2.x doesn't respect that (or com.macromates.Avian OakLineHeightDelta).


git-log and friends indent the commit message by four spaces on the left, so wrapping at ~72 chars gives it symmetry on 80 column terminals. By wrapping it yourself, you decide where line breaks should be, not the presentation machinery.

The optimal human-readable line length is something like 66 characters. It's much easier to quickly scan a log message that's 72 characters wide vs. one that is 200 characters wide.


Tangent time!

"The optimal human-readable line length" isn't really something that exists, even if we make lots of assumptions about basic stuff like font size, avg word length, and color contrast.

Here's a quick study on the reading speed and comprehension of character line lengths (cl) between 35 and 95 for reference: http://psychology.wichita.edu/surl/usabilitynews/72/LineLeng...

- most efficient reading (speed/accuracy) at 95cl

- line length does not affect comprehension

But here's the head spinner:

- 60% _preferred_ either 35cl or 95cl

- 100% _least preferred_ 35cl (45%) or 95cl (55%)

Line length is an easy thing to assume everyone perceives the same way, but even given a consistent environment (definitely not a given in this age of increasingly diverse device dimensions) there's a wide range of preferences with little real impact on readability. Unless, of course, your assumptions about readability clash with the user's preferences or reading environment.

Put simply - make your life easy and reduce problems by just letting the user decide.


Making semantic line breaks (such as for bullets) is understandable, but it still feels wrong that we’re otherwise doing the job of `fold`. I started breaking lines in commit messages because it’s convention, but I still believe this is a tooling issue.

This shell script wraps wide commit messages to the width of your console.

    GIT_PAGER="fold -s -w`stty size | awk '{print $2}'` | less" git log $@


You might be interested in the program "par", which uses dynamic programming to optimize the line breaks, and can automatically handle such things as text prefixed by "> ".

http://www.nicemice.net/par/


It's hard to understate the importance of this.

GitHub's online editor has a default commit message along the lines of "Edited path/to/file", and I see a lot of pull requests with that message, and nothing else. That's about the most useless message possible, since it adds no information that isn't already implicit in the commit. It would be better to leave it blank and force users to at least write _something_.


Be careful, we do that by default and we get a lot of "commit", "commit", "commit $date", "merge commit" messages from some programmers. Either a programmer accepts that a meaningful message is important on commits, or they don't. It's a people problem not a technical one.


The problem with that is that at least when I am merging something I often (with Mercurial anyway) don't have anything useful to say -- the commit is even marked specially as a merge commit. Other than bringing in one branch (which has hopefully been correctly commented) no changes were made.

So really, what do you want them to say?


Ah, but what if we encouraged programmers to write better commit messages? What if we splashed on a bit of gamification to raise everyone's level of awareness? Maybe a badge on your profile page...?


How would you objectively determine the usefulness of a commit message, though? While it might contain all the necessary parts, there is no way to determine if the sum of the parts adds up to a useful whole.

Also, badges are done to death. Everyone's got badges these days - so much so they're like ads. Personally, I've developed a blind spot to most of them.


Objectivity is irrelevant and impossible in this context of raising awareness and fun. If the mechanism was something as simple as an upvote next to the commit message, you would let the community define usefulness of the commit message.


Upvoting itself might be all you need.


Any you will determine that, programmatically, how exactly?

Besides, badges are for kids.


Actually if you follow the thread(s) relating to this, a less invasive change to speed up "git tag --contains" was adopted (see git.git@ffc4b8012), so "soon" probably isn't the right word.


Just for kicks, here's a (terribly ugly) pipeline that will display the contents of .nls and `ls`, with duplicates removed:

ls | cat .nls - | column -t -s: | sort -r | perl -ane 'print unless $x{$F[0]}++'

and then obviously just echo "dirname: description" >> .nls to append to the file.

I would be interested in seeing a better pipeline, one that doesn't need perl/awk/ruby/what have you to remove the duplicates correctly.


The join(1) command is designed to do exactly this:

join -a2 -t: <(sort .nls) <(ls | sort)

(I think this is different from your pipeline, in that your pipeline will print files in .nls that aren't actually in the directory.)


Awesome.


Oh hey, this is awesome! I thought about doing something like this but then opted for the (ultimately more flexible) python script.


So the author has reached this conclusion after _several hours_ of using Lion?


That's OK, most people decided that Vista sucked before it was even released.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: