GIT

From AWVVO
Revision as of 12:35, 29 January 2025 by Admin (talk | contribs) (Created page with "== Show current branch == <syntaxhighlight lang="bash" line highlight="" copy> @echo off for /f "delims=" %%a in ('git rev-parse --abbrev-ref HEAD') do ( set "current_branch=%%a" ) echo Current branch is: %current_branch% </syntaxhighlight> == Create new branch == <syntaxhighlight lang="bash" line highlight="" copy> git checkout -b newbranch </syntaxhighlight>")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Show current branch

@echo off
for /f "delims=" %%a in ('git rev-parse --abbrev-ref HEAD') do (
    set "current_branch=%%a"
)

echo Current branch is: %current_branch%

Create new branch

git checkout -b newbranch