I would like to do something like this:
$ git fetch origin
$ git rebase -i origin/a_very_very_very_long_branch_name
Where, my local branch name is as same as a_very_very_very_long_branch_name
.
So when I execute this kind of command, I don't want to copy and paste the long branch name again and again.
Are there any shortcuts for the current branch name in Git?
In your particular example, if your branch is tracking the remote branch, you can just do
git fetch
git rebase -i
Without parameters.
In case your branch is not tracking the remote branch, that can be set up by doing
git branch -u origin/a_very_very_very_long_branch_name
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With