datarockets / dotfiles

Configuration files for zsh, vim, and tmux
MIT License
11 stars 1 forks source link

Change git aliases to push to either "main" or "master" brach, whatever is available #30

Closed dzhlobo closed 3 years ago

dzhlobo commented 3 years ago

Many repositories are switching "master" branch to "main". I want to be able to use "gpom" alias with "main" branch as well.

I think we might want to use a function instead of alias which would check what branch is available to push to the correct one.

paydaylight commented 3 years ago

@dzhlobo wouldn't it be easier to push to whatever HEAD refers to?

dzhlobo commented 3 years ago

Yes, I think it would do the job 👍.

It's great to learn something, I just never use git push origin HEAD in my entire career :).

paydaylight commented 3 years ago

closing this issue, merged pull request #34