4 ms·
It's a combination of the command line itself, and the actual command line apps. For me, this is the single biggest use case for thefuck: $ git push fat
by bunderbunder 8y ago
It's a combination of the command line itself, and the actual command line apps.
For me, this is the single biggest use case for thefuck:
$ git push
fatal: The current branch my-branch-name has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin my-branch-name
$ fuck
git push --set-upstream origin my-branch-name [enter/↑/↓/ctrl+c]
(enter)
I'm pretty unrepentant about that one - I _could_ waste brain cells on keeping track of whether my branch already exists upstream, and I _could_ waste keystrokes typing out the more verbose command myself. But I'm not gonna. Life's too short.
- tejasmanohar 8y agoSame here, but then, I just ran the following and branches are now auto-created git config --global push.default current
- singingboyo 8y agoAdmittedly this isn't a concern for all repo setups, but what about the odd time you don't actually want to autocreate a branch? Saying/typing fuck won't help you now! Basically, thefuck does give some friction and force you to think about things - not much, but maybe just enough.
- BonesJustice 8y agoFrom the examples, it looks like you’re given an interactive list of ‘corrected’ commands to cycle through, and it won’t proceed until you hit <enter>. So if you don’t want to do what it suggests, just bail out.
- vvilliam0 8y agoTab autocomplete works nicely when configured