Android Studio - checkout a *branch* from GitHub

前端 未结 3 1913
终归单人心
终归单人心 2021-02-04 02:54

We have a repo in GitHub which has 3 branches. For example, say master, developer and preview.

When I checkout this re

3条回答
  •  渐次进展
    2021-02-04 03:40

    In AndroidStudio you have also the terminal (Tools --> Open Terminal, or View --> Tool Windows --> Terminal), open it, the current directory will be directly your project's, then just execute

    git checkout the_name_of_the_branch
    

    and that's all. I would recommend you then to use this: http://martinfitzpatrick.name/article/add-git-branch-name-to-terminal-prompt-mac/ it will be much easier to see on which branch you are, directly in the terminal.

提交回复
热议问题