Hacker News new | past | comments | ask | show | jobs | submit login
A Git Style Guide (github.com/agis-)
42 points by pasxizeis on April 4, 2015 | hide | past | favorite | 6 comments



I'm very happy to see this guide encouraging the use of squashing and rebasing. It's really frustrating to see patch sets being merged that look like:

* Add widget

<code review happens>

* Fix typo

* Add test

* Fix test

* etc.

People fear rebasing because they already pushed to a remote server. Just delete the remote branch and re-create it after you've rebased. Assuming, of course, that this is a feature branch of some sort that no one else depends on.

Clean, logical commits and a mostly linear history make me a happy developer.


A lot of these items seem to go against current standards for no particular reason (or with no clear explanation). I've mentioned two here [1], but there's several others.

[1]: https://github.com/agis-/git-style-guide/issues/4



>Prefer dashes over underscores.

Why? Is this just an arbitrary style preference, or is there some practical basis?


Alot of (Linux) package managers use dashes within package names and within package versions and underscores to split name from version. This is the convention I try to follow.

Example: package-name_1.0-rc1.pkg


I keep getting that question regarding this certain point. It's an arbitrary style preference. Hopefully this makes it clear: https://github.com/agis-/git-style-guide/commit/92455c1d85fd...




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

Search: