gitlab 随笔

时间:2024-01-15 08:09:50

输入:

$ git init

$ git add .

$ git commit -m 'init commit'

绿色部分为gitlab网页的项目创建后下面的ssh路径,也可以通过查看gitlab网页中的项目得知

$ git remote add origin git@xxx.xxx.x.xxx:xxxx/xxxx.git

然后输入

$ git push origin master

即可

2.代码的下载

打开你想要下载的文件夹,右键git bash here

输入代码

绿色部分为上面的ssh路径

git clone git@192.168.92.132:root/xxx.git

[root@node2 xxx]# git clone git@192.168.92.132:root/xxxx.git
Cloning into 'xxx'...
remote: Enumerating objects: , done.
remote: Counting objects: % (/), done.
remote: Compressing objects: % (/), done.
remote: Total (delta ), reused (delta )
Receiving objects: % (/), 7.66 KiB | bytes/s, done.
Resolving deltas: % (/), done.
[root@node2 xxx]#