1.获取git当前用户 和 设置
git config user.name获取用户名 git config user.name ‘hcc’ 设置用户名
git config user.email 获取用户email git config user.email ‘***@qq.com’
2.git仓库暂存 git stash git reset --hard 重置当前内容 git revert 撤销某次提交
3.git checkout 分支 切换分支 git checkout -b 分支1 新建分支1 并切换到该分支
git clone copy或者检出项目 git remote -v 查看远程仓库 git remote add ‘分支’ url 添加远程仓库
git remote set -url --push 分支 newurl 修改远程分支 git pull 拉取远程仓库
4.git status git add -A git commit -m ‘说明’ git push 查看状态 添加 提交 推送
5.git branch 查看本地分支 git branch -r 查看远程分支 git checkout 切换分支 git branch ‘分支’ 创建本地分支
git branch -d ‘分支’ 删除分支 git merge ‘分支’ 合并分支
6.git tag 查看git版本 git tag ‘版本’ 创建版本 git tag -d ‘banben’ 删除版本
git 命令
最新推荐文章于 2024-09-09 13:49:07 发布