git status | 查看当前状态 |
git add x git add x.cpp git add . | 添加到暂存区 |
git commit -m 'comment' | 添加到本地仓库 |
git commit -a -m 'comment' | 提交到本地仓库,跳过暂存区 |
git push | 推到远端仓库 |
git -c http.sslVerify=false -c http.extraheader="AUTHORIZATION: Basic Om5vNndpd2g2cmt4NXNwcTd2cmQ1d2gzajNpdTd3ZXdud3o2aTVrcm Z0dGh4bmt2d2p4YXE=" push origin dev-melon | 带令牌推到远程仓库 (token前加:再Base64编码) |
git branch | 查看当前分支 |
git branch -d branch-name | 删除本地分支 |
git remote show origin | 查看远程分支 |
git branch -a | 查看所有分支 |
git remote prune origin | 同步分支信息 |
git checkout branch-name | 切换分支 |
git checkout -b new-branch-name | 在当前分支基础上创建一个新的分支 |
git remote -v | 查看远程仓库 |
git remote set-url origin https://10.1.1.53:443/tfs/office/Before_Market_DM S_System/_git/Before_Market_DMS_System/ | 切换远程仓库地址 |
git lfs ls-files | 查看当前被跟踪的文件 |
git merge branch-name | 合并另一个分支到当前分支中 |
git log --graph | 带图形的分支记录 |
Git命令使用
于 2020-11-30 14:42:40 首次发布