命令 git

gitlab初始化配置

 

Command line instructions
You can also upload existing files from your computer using the instructions below.
gitlab仓库配置
Git global setup

git config --global user.name "username"
git config --global user.email "user@com"

 


新仓库
Create a new repository

git clone git地址
cd composer
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master

 

已存在文件夹加入仓库
Push an existing folder

cd existing_folder
git init
git remote add origin git地址
git add .
git commit -m "Initial commit"
git push -u origin master

 

已存在仓库
Push an existing Git repository

cd existing_repo
git remote rename origin old-origin
git remote add origin git地址
git push -u origin --all git push -u origin --tags

 

git 强制覆盖本地工作区的修改,方法如下:

git fetch --all
git reset --hard origin/master
git pull

 

posted @ 2020-04-14 14:23  破仔  阅读(101)  评论(0编辑  收藏  举报