Git

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的别名
是分⽀支
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容