常用的git命令

2021-03-29  本文已影响0人  小溪流jun

安装依赖

npm install

查看镜像

npm get registry 

切换淘宝镜像

npm config set registry http://registry.npm.taobao.org/

清楚npm缓存

npm cache clean --force

nrm ls:查看当前的镜像地址

nrm test:查看自己的nrm使用的地址

nrm use 镜像源地址:更改自己的镜像源地址

npm install --global nrm :安装nrm

git clone 远程仓库的http地址 :克隆项目

git remote add 别名 远程仓库的http地址 :设置别名

git add . || git add --all :添加

git commit -m '版本信息' :添加

git push 别名 本地分支名 :上传代码

git push 别名 本地分支名:远程分支名 :上传代码

git pull 远程仓库的http地址 :拉代码

git push 别名 --delete 远程分支名 :删除远程分支

git config --global user.name '名字' :自报家门

git config --global user.email '邮箱' :自报家门

git config --list :确认自报家门

git init :出现.git隐藏文件夹

git status :查看git管理的文件信息

git branch 分支名 :创建分支

git branch -d 分支名 :删除分支

git checkout 分子名 :切换分支

git branch / git branch -a :查看分支

git merge 分支名 :合并分支

上一篇 下一篇

猜你喜欢

热点阅读