If you’re using Magit 1.0 or newer to work with Git from Emacs, you have probably noticed that when you press keys it now shows a little menu where you can enable flags and pass options. It’s easy to add more. Here’s how I teach Magit about “push -u”, which I use to push local branches to a remote repository and configure them to track the remote branch automatically:
(eval-after-load 'magit '(magit-key-mode-insert-switch 'pushing "-u" "Set upstream" "-u"))
You can find all the groups of switches and arguments by typing C-h v magit-key-mode-groups