Skip to content

Instantly share code, notes, and snippets.

@Dimon70007
Last active June 7, 2023 12:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dimon70007/8acdf5b43ad61af2169e70902eef2391 to your computer and use it in GitHub Desktop.
Save Dimon70007/8acdf5b43ad61af2169e70902eef2391 to your computer and use it in GitHub Desktop.
alias for push current branch to origin remote git repo
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