<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
        <title>Git - Tag - HEJTAO</title>
        <link>https://hejtao.netlify.app/tags/git/</link>
        <description>Git - Tag - HEJTAO</description>
        <generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Wed, 04 Jul 2018 00:00:00 &#43;0000</lastBuildDate><atom:link href="https://hejtao.netlify.app/tags/git/" rel="self" type="application/rss+xml" /><item>
    <title>Git Commands</title>
    <link>https://hejtao.netlify.app/posts/cs-git/</link>
    <pubDate>Wed, 04 Jul 2018 00:00:00 &#43;0000</pubDate>
    <author>HEJTAO.COM</author>
    <guid>https://hejtao.netlify.app/posts/cs-git/</guid>
    <description><![CDATA[# file的修改添加到暂存区 git add file # 创建新的版本库，并将file在暂存区中的修改添加到新的版本库中 git commit file -m &#34;comment message&#34; # 将工作区和暂存区的修改装箱后回到版本库初始状态(相当于撤销所有修改) git stash # 将 git stash装箱的修改倒出 git stash pop #撤销file工作区的修改 git checkout -- file # file发生merge冲突时，完全采取本方(他方)的修改 git checkout --ours (--theirs) file git add file # 获取远程分支dev的代码，并在本地创建本地分支local_dev git fetch origin dev:local_dev # 拉取远程分支dev与当前分支和并(merge) git pull origin dev # 切换到某个版本库 git reset --hard commit_id(前4位数) # 新建分支 git branch branch_name git branch branch-name commit_hash git checkout -b branch_name commit_hash # 删除分支 git branch -d branch_name # 删除远程分支 git push origin -d branch_name # 合并分支 git merge --squash feature_branch git status git log git reflog # 打印远程仓库名称和地址 git remote -v # 增加一个远程仓库 git remote set-url --add origin git@gitlab.]]></description>
</item>
</channel>
</rss>
