git仓库构建小记

1.新建 .git 文件夹

约定的文件目录下,新建 .git 文件夹

mkdir test.git

2.初始化服务端仓库

git init --bare test.git

此时进入 test.git 文件夹下文件目录如下:

branches  config  description  HEAD  hooks  info  objects  refs

至此,git服务端仓库构建完毕

3.idea连接远程仓库并push

idea新建项目并在本地初始化,右击项目,Git - Repository - Remotes ,弹出的窗口中新增 git服务端新建的仓库即可。

执行push,Push successful:。。。。

猜你喜欢

转载自www.cnblogs.com/nyatom/p/10281440.html
今日推荐