Say I want to run the command:
git reset --hard origin/abc
where abc
is my current branch. How can I programmatically insert the current branch into the command instead of having to run git branch --show
, copying the result, and pasting into the reset
command?
git reset --hard origin/$(git branch --show-current)
?