GitLab使用(Gitlab uses)

git推送

cd project
git init
git remote add origin <remote>
git add .
git commit -m "first commit"
git push -u origin master
  • 第一次git需要输入用户名和密码,按提示输入即可;
  • 没安装git的话会弹出提示,按提示安装就行;

git拉取

cd project
git init
git remote add origin <remote>
git pull <remote> <branch>
  • remote是http地址,branch就是master

如果commit时候遇到如下类似情况:
No ESLint configuration found.
可以通过在命令中添加–no-verify 参数来跳过

如果commit时候遇到如下类似情况:
No ESLint configuration found.
可以通过在命令中添加–no-verify 参数来跳过

git commit -m "first commit" --no-verify

其他命令

//设置分支
git branch --set-upstream-to=origin/master master

//回退版本
git reset --hard 版本号

//查看remote仓库
git remote -v

//清除remote仓库
git remote remove origin
————————

git推送

cd project
git init
git remote add origin <remote>
git add .
git commit -m "first commit"
git push -u origin master
  • For the first time, GIT needs to enter the user name and password, and you can enter it according to the prompt;
  • If Git is not installed, a prompt will pop up. Just install it according to the prompt;

git拉取

cd project
git init
git remote add origin <remote>
git pull <remote> <branch>
  • remote是http地址,branch就是master

If you encounter the following similar situations during commit:
No ESLint configuration found.
You can skip this by adding the — no verify parameter to the command

If you encounter the following similar situations during commit:
No ESLint configuration found.
You can skip this by adding the — no verify parameter to the command

git commit -m "first commit" --no-verify

Other commands

//设置分支
git branch --set-upstream-to=origin/master master

//回退版本
git reset --hard 版本号

//查看remote仓库
git remote -v

//清除remote仓库
git remote remove origin