Feature Request: `forgit::pull` and `forgit::push`
Check list
- [X] I have read through the README
- [X] I have the latest version of forgit
- [X] I have searched through the existing issues
Environment info
- OS
- [ ] Linux
- [X] Mac OS X
- [ ] Windows
- [ ] Others:
- Shell
- [ ] bash
- [X] zsh
- [ ] fish
Problem / Steps to reproduce
I usually like to use forgit for mostly ga and gd commands. Unfortunately, it does not have push and pull commands. I want to interactively select both of remote and branch so that here is what I've been using the fzf command with git combined:
is_in_git_repo() {
git rev-parse HEAD > /dev/null 2>&1
}
function fzfgb {
is_in_git_repo &&
_git_dbg branch -a -vv --color=always | grep -v '/HEAD\s' |
fzf --height 40% --ansi --multi --tac | sed 's/^..//' | awk '{print $1}' |
sed 's#^remotes/[^/]*/##'
}
function fzfgr {
is_in_git_repo &&
_git_dbg remote -v | awk '{print $1 " " $2}' | uniq |
fzf --height 40% --tac | awk '{print $1}'
}
$ git push $(fzfgr) $(fzfgb)$ git pull $(fzfgr) $(fzfgb)
Maybe we can make similar or better UX by implementing forgit::push and forgit::pull commands. Wdyt? Waiting your thoughts!
Hi @Dentrax, thanks for your suggestion. In my opinion this would be a useful extension.
@wfxr @cjappl What do you think?
@carlfriedrich Have the same opinion as you.
Works for me!
On Mon, Oct 24, 2022 at 4:59 AM, Wenxuan @.***> wrote:
@.***(https://github.com/carlfriedrich) Have the same opinion as you.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Cool! So @Dentrax would you provide a PR for this yourself?
Pinging @Dentrax
Pong! @cjappl
I couldn't find to get into it but if anyone want to submit a PR for this please feel free.