标签:ast ini mit 版本号 upstream out efs git merge name
<li>git init "在本地初始化git仓库"</li>
<li>git add file "添加文件到暂存区"</li>
<li>git commit -m ‘xxx‘ "将文件提交到git仓库"</li>
<li>git status "查看文件状态"</li>
<li>git diff "查看修改内容"</li>
<li>git log "查看提交历史"</li>
<li>git reflog "查看命令历史"</li>
<li>git reset --hard commit_id "本地版本回退" git push origin master --force</li>
<li>git revert "远端版本号" "远端回退上一版"</li>
<li>git checkout --file "丢弃工作区修改"</li>
<li>git rm file "用来删除一个文件"</li>
<li>git remote add origin git@server-name:path/repo-name.git "关联一个远端仓库"</li>
<li>git push -u origin master "第一次推送远端内容"</li>
<li>git clone 远端地址 "克隆远端仓库到本地"</li>
<li>git branch "查看分支 *代表当前分支"</li>
<li>git branch ‘name‘ "创建新分支"</li>
<li>git checkout ‘name‘ "创建分支并且切换到分支"</li>
<li>git merge ‘分支名‘ "将分支merge到当前分支"</li>
<li>git branch -d ‘name‘ "删除分支"</li>
<li>git log --graph "查看分支合并图"</li>
<li>git remote -v "查看远程库信息"</li>
<li>git tag "查看所有标签"</li>
<li>git tag ‘name‘ "新建标签"</li>
<li>git tag ‘name‘ commit id "为指定标签打tag"</li>
<li>git tag -a ‘name‘ -m ‘xxx‘ "指定标签信息"</li>
<li>git push origin ‘tagname‘ "向远程推送本地标签"</li>
<li>git push origin --tags "推送全部未推送的标签"</li>
<li>git tag -d ‘tagname‘ "删除标签"</li>
<li>git push origin :refs/tags/‘tagname‘ "删除一个远程标签"</li>
<li>git push --set-upstream origin dev "本地新建分支在远端构建"</li>
标签:ast ini mit 版本号 upstream out efs git merge name
原文地址:https://www.cnblogs.com/bicycle-lei/p/9197519.html