Git development
 help / color / mirror / Atom feed
* [ITCH] pull.default
@ 2013-03-18 18:39 Ramkumar Ramachandra
  2013-03-18 18:57 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Ramkumar Ramachandra @ 2013-03-18 18:39 UTC (permalink / raw)
  To: Git List

Hi,

I usually use `git fetch`, inspect state, and then merge/ rebase
accordingly.  Unfortunately, this is very sub-optimal as I can
automate this 80% of the time.  I want to be able to decide what to do
on a repository-specific basis, and hence propose a pull.default which
can be set to the following:
1. fetch.  Just fetch.  (I will set this as my default in ~/.gitconfig)
2. fast-forward.  Fetch.  If the FETCH_HEAD is directly ahead of HEAD,
`stash`, merge, and stash apply.  Otherwise, do nothing.
3. rebase.  Fetch.  stash, rebase, stash apply. `git pull n` will do
rebase --onto master HEAD~n instead of rebase.
4. reset.  Fetch, stash, reset --hard FETCH_HEAD, stash apply.

Ofcourse, it should print a message saying what it did at the end.

What do you think?

Ram

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-04-13 21:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-18 18:39 [ITCH] pull.default Ramkumar Ramachandra
2013-03-18 18:57 ` Junio C Hamano
2013-03-18 19:21   ` Ramkumar Ramachandra
2013-04-13 21:54   ` Ramkumar Ramachandra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox