Right now when i commit and want to push and create remote branch I did:
app_folder (some_branch)> git push -u origin some_branch:some_branch
Is there a way to write zsh alias ex: gpu which get name of current branch and do that without my help?
Here’s a very basic script. Some additional features (and error checking!) are probably needed, but it works:
The
branch()function is taken from Oh-My-ZSHgit_prompt_info()– it’s used to put the currentgit branchinto thePROMPT.This would probably work rather well as a
zshfunction, rather than an alias.