[ITCH] pull.default

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]