Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

77 lines (53 sloc) 1.497 kb
<!DOCTYPE html>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href=./style.css>
<pre><code>git config --global &quot;Your Name Comes Here&quot;
git config --global
<pre><code>git add .
git add somefiles
<pre><code>git commit
git commit -m&quot;with some message&quot;
git commit -a # Auto tract file that already add
<pre><code>echo &quot;zh&quot; &gt; .gitignore # ignore the zh dir
<h2>Git log</h2>
<pre><code>git log
git log --stat --summary # look version&#39;s change
git show dfb02e6e4f2f7b573337763e5c0013802e392818
git show dfb02
git show HEAD # Show now branch&#39;s new version
git show HEAD^ # Show HEAD&#39;s father
git show HEAD^^ # 查看 HEAD&#39;s grandfather
git show HEAD~4 # 查看 HEAD grandfather&#39;s grandfather
git tag v0.1 dfb02
git show
<pre><code>git branch local # add the &quot;local&quot; branch
git branch # show the branch
git checkout local # switch to local
git checkout master
git merge local
git branch -d local # delete local if merge
git branch -D local # delete
<h2>git revert</h2>
<pre><code>git revert commit-id #恢复历史版本
<h2>git reset</h2>
<pre><code>git reset commit-id #重置为历史状态
Jump to Line
Something went wrong with that request. Please try again.