三、 idear 配置git私服

1.创建本地仓库

 

2.Idear 打开引入仓库

 

a)把项目拷贝到仓库目录下

D:\gitrepo\jyz-eureka

b)提交本地仓库及缓存区域

 

Add添加完后如下

 

Commit提交完后 文件内容颜色发生改变

c)本地文件上传到远程私有仓库

git remote add origin <server>

远程服务器配置地址

 

 

d)如果进行远程服务器pull报下面错误

Push rejected: Push master to git/master was rejected by remote

说明权限不够重新进行远程服务器设置

[root@izey5xz git]# su git

[git@izey5xz ~]$ git init --bare /home/git/jyzrepo

hint: Using 'master' as the name for the initial branch. This default branch name

hint: is subject to change. To configure the initial branch name to use in all

hint: of your new repositories, which will suppress this warning, call:

hint: git config --global init.defaultBranch <name>

hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and

hint: 'development'. The just-created branch can be renamed via this command:

hint: git branch -m <name>

Initialized empty Git repository in /home/git/jyzrepo/

查看权限

再次push上传成功

15:15 Push successful: Pushed master to new branch git/master

3.检出仓库

执行如下命令以创建一个本地仓库的克隆版本:
git clone /path/to/repository


如果是远端服务器上的仓库,你的命令会是这个样子:
git clone username@host:/path/to/repository

打开idear

 

设置远程地址

 

即可下载远程服务器项目

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值