admin管理员组

文章数量:1794759

git基本命令

git初始化

git init

git拉取代码

git clone .git

git拉取某一个分支

git clone -b feature/123 .git

git上传文件

git status

git add cypress/e2e/1.spec.ts

添加所有文件,使用 git add .

git commit -m "feat: 添加测试用例"

git pull

git push

git只上传指定文件

git status

git add cypress/e2e/1.spec.ts cypress/e2e/2.spec.ts cypress/e2e/3.spec.ts

git stash -u -k

git commit -m "feat: 上传测试用例"

git pull

git push

git stash pop

git删除文件

git add .

git rm cypress/1.cy.ts cypress/2.cy.ts cypress/3.cy.ts

git commit -m "fix: 删除cypress目录.cy.ts文件"

git push

git查看所有分支

git branch -a

git创建新分支并切换到新分支

git checkout -b origin/dev

本文标签: git基本命令