4 ms·
Embrace your habit of mistyping: https://github.com/nvbn/thefuck#readme https://github.com/nvbn/thefuck#readme
by storyinmemo 4y ago
Embrace your habit of mistyping: https://github.com/nvbn/thefuck#readme https://github.com/nvbn/thefuck#readme
- SAI_Peregrinus 4y agoI use that all the time as a shortcut to push new git branches without having to type the whole name.
- gary-kim 4y agoYou can enable tab complete for Git including for branch names. I don't know how I would live without that. I tend to make rather verbose branch names and typing it all out stuff like push would take forever. Though, you have a much more fun solution.
- kelnos 4y agoIn addition to tab complete for branch names, git has a `help.autoCorrect` config item that allows git to automatically correct typos in command names. I weirdly type "git poush" incredibly often, and it's nice for git to pretend I typed "push".
- RagingCactus 4y ago`git push -u origin HEAD` pushes the current branch to `origin` with the same name you have locally. You could even add an alias for that.
- mananaysiempre 4y agoOr set `push.default` to `current` to have plain `git push origin` push to the same remote name, ignoring the configured upstream (you might also want to set `remote.pushDefault` alongside that).