
gitlab入门(保姆级)教程
首先来说说git和gitlab有什么区别?
(前提确保电脑已经安装git)
git global setup(git全局设置)
git config --global user.name "库名" git config --global user.email "邮箱"
create a new repository(创建一个新的仓库)
git clone xxxxxx(clone with http)
cd (项目文件夹名字)
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
push an existing folder(推送现有文件夹) 【常用】
cd (项目文件夹名字)
git init
git remote add origin xxxxxx(clone with http)
git add .
git commit -m "xxxx"
git push -u origin master
push an existing git repository(推送现有的git仓库)
cd (项目文件夹名字)
git remote rename origin old-origin
git remote add origin xxxxxx(clone with http)
git push -u origin --all
git push -u origin --tags