Git global setup
git config --global user.name "陈俊"
git config --global user.email "271200229@qq.com"
Create a new repository
git clone https://gitlab.com/JceJun/Demo.git
cd Demo
touch README.md
git add README.md </pre>
git commit -m "add README"
git push -u origin master
Existing folder
cd existing_folder
git init
git remote add origin https://gitlab.com/JceJun/Demo.git
git add .
git commit -m "Initial commit"
git push -u origin master
Existing Git repository
cd existing_repo
git remote rename origin old-origin
git remote add origin https://gitlab.com/JceJun/Demo.git
git push -u origin --all
git push -u origin --tags
本地创建Demo
cd 文件夹
git init
git add .
git commit -am '123' gitLab创建Demo
git remote add
git push
git push --set-upstream Demo master
拉取
git pull Demo master git pull origin master 是url的别名
是分⽀支
网友评论