從gitlab上剛clone下來的項(xiàng)目,默認(rèn)是在master分支,如果想看其它origin分支,可直接git checkout origin/分支名
但最近遇到一個(gè)無法checkout的情況,在切換到其它origin分支的時(shí)候,提示Untracked files:(user "git add <file>..." to include in what will be committed) .idea/

untracked files.png
解決方法:在當(dāng)前目錄進(jìn)入終端,執(zhí)行一下命令
rm -rf .idea
關(guān)于.idea,這里有個(gè)文章講的很詳細(xì)