Commit graph

17 commits

Author SHA1 Message Date
Dan Croak
49a4597dc4 Make it easy to checkout GitHub pull requests
This alias makes the following workflow possible:

Look at changes:

    git co-pr 123
    git diff origin/master

Bundle, validate tests are passing:

    bundle
    rake

Rebase interactively, squash, and potentially improve commit messages:

    git rebase -i master

Merge code into master:

    git checkout master
    git merge pr/123 --ff-only

Push:

    git push origin master

Clean up:

    git branch -D pr/123
2014-07-25 19:09:11 -07:00
Joe Ferris
6d0ea824f4 Automatically prune remote branches when fetching
* Removes the need to occasionally run `git remote prune`.
* Remove branches when fetching instead of deleting other branches.

https://trello.com/c/ePlghTll/249-configure-git-to-prune-on-fetch
2014-04-21 10:25:20 -04:00
Mike Burns
11a5504dfe Add a commit message template
Using the `commit.template` setting, read in a commit message template
for each commit. This template is commented out so the commit message
author doesn't need to delete it.

The template serves as a reminder on how to write a better commit
message. The bullets are taken from Caleb's blog post[1]. There is no
_problem_ per se -- we are writing good messages these days -- but it's
handy to be reminded of things to think about. For example, people often
forget to note whether there are any side effects.

This message does not show on `git commit --amend`, only normal `git
commit`.

[1] http://bit.ly/13HWyiy
2013-10-08 09:59:44 +02:00
Dan Croak
b7bc52ec20 Git push to current, not upstream
The primary use case for me is to `git push staging` and `git push
production` from the master branch using our typical git workflow:

https://github.com/thoughtbot/guides/tree/master/protocol#deploy
2013-07-10 23:16:27 -07:00
Greg Lazarev
8e141fed5e Include gitconfig.local file for personal changes
* assumes same directory existance
* allows for easier addition of personal configs
2013-06-28 13:11:08 -07:00
Dan Croak
32e79b642f git up alias and git up -i documentation 2013-06-11 14:53:15 -07:00
Dan Croak
bb757b4a23 Add g pr alias for hub pull-request 2013-04-18 21:44:18 -07:00
Dan Croak
e5a38c353a Remove git br alias
I almost never use `git branch`.
2013-04-14 11:30:48 -07:00
Dan Croak
c04243741f Always merge with ff = only
@jferris:

This has the effect that Git will never implicitly do a merge commit,
including while doing git pull. If I'm unexpectedly out of sync when I
git pull, I get this message:

> fatal: Not possible to fast-forward, aborting.

At that point, I know that I've forgotten to do something in my normal
workflow, and I retrace my steps.

@gylaz:

I like the value of seeing a failure message if a pull (or just merge)
fails due to not being able to get fast-forwarded. Then I can look to
see whose changes went out, that I may have not expected to be there.
2013-04-10 10:17:07 -07:00
Greg Lazarev
31231c812a Use color.ui = auto setting to color git output 2013-04-08 23:32:50 -07:00
Derek Prior
7b76714de0 Change the 'git commit --amend' alias to 'git ca' 2013-03-08 17:17:57 -08:00
Joshua Clayton
68fe4b1d4c Update git's push.default from tracking to upstream
The 'tracking' value has been deprecated in favor of 'upstream'.
2013-02-23 19:08:08 -08:00
Joe Ferris
e35064bcee Revert to default Git log style
* Our current style hides message details
* Default style shows details and one-line versions as appropriate
2013-02-21 10:51:12 -05:00
Greg Lazarev
f243090e1e Add git alias branch as br 2013-02-13 09:36:50 -08:00
Dan Croak
bc2bc89cde Add aliases for most common git commands 2013-01-18 11:36:50 -08:00
Dan Croak
f893537686 Add basic git aliases
* Fast commits.
* Fast rebase of origin into feature branch.
* Fast merge feature branch into master.
* Fast branch creation.
* Fast branch deletion.

Conflicts:

	gitconfig
2012-10-08 20:30:29 -07:00
Dan Croak
fdc8afcd19 adding a global .gitconfig that by default tracks branches (so you can 'git push' from a branch it only pushes to the tracking branch you're in) and also provides a tighter, more colorful git log 2011-10-24 10:30:50 -04:00