Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

git command to switch from my current branch to another in android studio

To create a new branch in Git, you use the git checkout command and pass the -b flag with a name.

This will create a new branch off of the current branch. The new branch's history will start at the current place of the branch you "branched off of."

Assuming you are currently on a branch called master:

(master)$ git checkout -b my-feature
Switched to a new branch 'my-feature'
(my-feature)$
Here you can see a new branch created called my-feature which was branched off of master.
 
PREVIOUS NEXT
Tagged: #git #command #switch #current #branch #android #studio
ADD COMMENT
Topic
Name
2+8 =