Last active
June 7, 2023 12:05
-
-
Save Dimon70007/8acdf5b43ad61af2169e70902eef2391 to your computer and use it in GitHub Desktop.
alias for push current branch to origin remote git repo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For lazy people))) you can add this alias to your ~/.bash_profile or ~/.zprofile or ~/.bashrc | |
```bash | |
alias push_current='git push origin `git branch | grep "*" | sed "s/\* //"`' | |
``` | |
then call `source ~/.bash_profile` | |
when you want to push current branch to remote git repo | |
just call | |
``` | |
push_current | |
``` | |
or | |
``` | |
push_current -f | |
``` | |
for force update |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment