克隆远程仓库的某分支项目
git clone -b branchName 项目克隆地址
创建分支
git checkout -b branchName
切换分支
git checkout branchName
查看本地分支目录
git branch
查看远程分支目录
git branch -a 或者 git branch -r
删除分支
git branch -d branchName
删除远程分支
git push origin --delete branchName
提交本地文件到远程仓库
git add *
git commit -m "Update information"
git push origin branchName
可能会遇到警告:
warning: in the working copy of 'todo_list4.0/oh-package-lock.json5', LF will be replaced by CRLF the next time Git touches it
解决方法:
删除远程仓库的某分支下的文件
git rm -rf filename
git commit -m "delete filename"
git push origin branchName
查看文件状态
git status