thoughtbot / dotfiles

A set of vim, zsh, git, and tmux configuration files.
https://thoughtbot.com
Other
7.97k stars 1.87k forks source link

Basic .gitconfig #10

Closed croaky closed 13 years ago

croaky commented 13 years ago

I helped someone set up their laptop today for Rails development. One thing that bugged me about his thoughtbot/{laptop,dotfiles} setup was the git settings.

What if we added this as the basic gitconfig?

[push]
  default = tracking
[format]
  pretty = %Cblue%h%Creset %Cgreen[%ar]%Creset (%an) %s
[alias]
  up = !git fetch origin && git rebase origin/master
  down = !git fetch && git rebase origin/master && git checkout master && git merge @{-1} && git push

This is a file that also immediately gets edited (when Github encourages them to add their git user name and email). Is that okay? I guess most other files in dotfiles are similarly edited / modified heavily by the user.

gabebw commented 13 years ago

down should be changed to done - it's much more clear.

jferris commented 13 years ago

I thought we already had a gitconfig; I'm cool with adding one.

If you follow the format here: https://github.com/jferris/dot_files/blob/master/gitconfig

Then future changes upstream can be merged with custom changes later using install.sh.

croaky commented 13 years ago

I added a gitconfig for the default tracking branch and format, but left the aliasing alone for now because I know people do it differently:

https://github.com/thoughtbot/dotfiles/commit/fdc8afcd198ebaefe8b17388f85fab801251b7fa

It was the git log that drove me crazy when I was working with the Rails apprentice.