如何把git上的项目导入到IDEA中

mac2024-05-26  30

找到你想把git上的项目导入的文件夹:C:\zhgao_files\project右击鼠标->Git Bash Here输入命令:git clone  git地址,(如果出现Checking out files:100%(72/72),done,则下载成功)输入命令:cd  /BOND  (进入到该项目中)输入命令:git checkout –b zhgao  (创建本地分支zhgao,并转到zhgao)输入命令:git push origin zhgao  (创建远程分支zhgao)                   如果最后输出    *[new branch]  zhgao -> zhgao      那么本地分支成功push如果输出                                                                                 GitLab: You are not allowed to push code to this project.                   fatal: Could not read from remote repository.                            Please make sure you have the correct access rights and the repository exists .                                      说明:git上没有给你分配权限,让负责人给你分配权限,然后再输入 git push origin zhgao打开IDEAFile->Open 找到项目的pom.xml打开点击右下角的Event log ,出现新窗口,点击Add root;(右下角出现Git:zhgao则成功)点击 File -> Settings ->Maven  设置Maven home directory、User settrings file
最新回复(0)