GitLab的使用

上传代码至GitLab仓库

1.在要上传的代码文件夹鼠标右键: Git Base Here

2.准备生成公钥

cd ~/.ssh/

如果没有该文件夹则创建

mkdir ~/.ssh  

3.配置GitLab账号xinx

git config --global user.name "你的gitlab名称"
git config --global user.email "你的gitlab邮箱"

4.生成SSH公钥

ssh-keygen -t rsa -C "你的gitlab邮箱"

5.在C:\Users\Administrator\.ssh目录下生成id_rsa和id_rsa.pub

id_rsa.pub里的内容粘贴到GitLab页面配置公钥

6.将仓库克隆至本地

git clone https://github.com/lujuhao/maven-ssm.git

7.将代码复制进刚刚克隆的仓库

8.cd 到仓库文件夹

git config --global http.postBuffer 524288000  设置临时缓存为500M,不然可能上传不上去 
git add .        (注:别忘记后面的.,此操作是把Test文件夹下面的文件都添加进来)
git commit  -m  "提交信息"  (注:“提交信息”里面换成你需要,如“first commit”)
git push -u origin master   (注:此操作目的是把本地仓库push到github上面,此步骤需要你输入帐号和密码)
原文地址:https://www.cnblogs.com/ljhblogs/p/11751251.html