Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

How to get current git branch into an environment variable or something all the time?

Hi I want to run git push origin $BRANCH instead of typing the current branch name. How do I do that? If your answer is create an alias for the entire push or anything else I didn't ask for then you need not apply

2 Answers

Relevance
  • 3 months ago
    Favorite Answer

    I climbed up a tree but the branch broke and i fell on my head 

    Source(s): snopes fat checked
  • Anonymous
    3 months ago

    set BRANCH=blahblah

    set BRANCH="blah blah"

    git push origin %BRANCH%

Still have questions? Get your answers by asking now.