I have read about how we can configure our git push to push to the current branch we are in using 1.
git config push.default current
but I also read about how you can push to your remote branch (to have the same name as your local branch) using 2.
git push origin HEAD
When do you use 1 and when do you use 2?
git push origin HEAD
supplies enough arguments thatgit push
ignores the configured setting, butgit push
without theorigin HEAD
part uses the configured setting, so there's some cross-over at some point—just not in the question as phrased...