Administrator@2013-20131003RY MINGW64 ~ $ pwd /c/Users/Administrator Administrator@2013-20131003RY MINGW64 ~ $ cd e:/ Administrator@2013-20131003RY MINGW64 /e $ pwd /e Administrator@2013-20131003RY MINGW64 /e $ cd github Administrator@2013-20131003RY MINGW64 /e/github $ mkdir indoor Administrator@2013-20131003RY MINGW64 /e/github $ cd indoor Administrator@2013-20131003RY MINGW64 /e/github/indoor $ git init Initialized empty Git repository in E:/github/indoor/.git/ Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git add readme.txt Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ gir commit -m "wrote a readme file " bash: gir: command not found Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git commit -m "wrote a readme file " [master (root-commit) 3792c32] wrote a readme file 1 file changed, 1 insertion(+) create mode 100644 readme.txt Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git status On branch master Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: readme.txt no changes added to commit (use "git add" and/or "git commit -a") Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git diff readme.txt diff --git a/readme.txt b/readme.txt index f7a8387..235b502 100644 --- a/readme.txt +++ b/readme.txt @@ -1 +1,2 @@ -<B2><E2><CA><D4> ʹ<D3><C3>git <BF>ͻ<A7><B6><CB> \ No newline at end of file +<B2><E2><CA><D4> ʹ<D3><C3>git <BF>ͻ<A7><B6><CB> +<B5>ڶ<FE><D0><D0> \ No newline at end of file Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git add readme.txt Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git status On branch master Changes to be committed: (use "git reset HEAD <file>..." to unstage) modified: readme.txt Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git commit -m "add distributed go commit" [master 5f87ecf] add distributed go commit 1 file changed, 2 insertions(+), 1 deletion(-) Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git status On branch master nothing to commit, working directory clean Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git log --pretty=oneline 5f87ecf99fe738341233181f2cb176e0fc249971 add distributed go commit 3792c3284467ed426d7a2be67ff692eb510a5bbb wrote a readme file Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git reset --hard HEAD^ HEAD is now at 3792c32 wrote a readme file Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ cat readme.txt ▒▒▒▒ ʹ▒▒git ▒ͻ▒▒▒ Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git log commit 3792c3284467ed426d7a2be67ff692eb510a5bbb Author: Francecil <396324491@qq.com> Date: Sat Sep 19 21:11:16 2015 +0800 wrote a readme file Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git reset --hard 5f fatal: ambiguous argument '5f': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git reset --hard 5f87ecf HEAD is now at 5f87ecf add distributed go commit Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git log commit 5f87ecf99fe738341233181f2cb176e0fc249971 Author: Francecil <396324491@qq.com> Date: Sat Sep 19 21:25:31 2015 +0800 add distributed go commit commit 3792c3284467ed426d7a2be67ff692eb510a5bbb Author: Francecil <396324491@qq.com> Date: Sat Sep 19 21:11:16 2015 +0800 wrote a readme file Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git reflog 5f87ecf HEAD@{0}: reset: moving to 5f87ecf 3792c32 HEAD@{1}: reset: moving to HEAD^ 5f87ecf HEAD@{2}: commit: add distributed go commit 3792c32 HEAD@{3}: commit (initial): wrote a readme file Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git log commit 5f87ecf99fe738341233181f2cb176e0fc249971 Author: Francecil <396324491@qq.com> Date: Sat Sep 19 21:25:31 2015 +0800 add distributed go commit commit 3792c3284467ed426d7a2be67ff692eb510a5bbb Author: Francecil <396324491@qq.com> Date: Sat Sep 19 21:11:16 2015 +0800 wrote a readme file Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ cat readme.txt 测试 使用git 客户端 第二行 Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git status On branch master Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: readme.txt no changes added to commit (use "git add" and/or "git commit -a") Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git diff diff --git a/readme.txt b/readme.txt index 235b502..141e7b4 100644 --- a/readme.txt +++ b/readme.txt @@ -1,2 +1,2 @@ -<B2><E2><CA><D4> ʹ<D3><C3>git <BF>ͻ<A7><B6><CB> -<B5>ڶ<FE><D0><D0> \ No newline at end of file +测试 使用git 客户端 +第二行 \ No newline at end of file Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git status On branch master Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: readme.txt Untracked files: (use "git add <file>..." to include in what will be committed) LICENES.txt no changes added to commit (use "git add" and/or "git commit -a") Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git add readme.txt Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git add LICENES.txt Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git status On branch master Changes to be committed: (use "git reset HEAD <file>..." to unstage) new file: LICENES.txt modified: readme.txt Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git commit -m "understand how stage works" [master 45b7b4d] understand how stage works 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 LICENES.txt Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git status On branch master nothing to commit, working directory clean Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git status On branch master Untracked files: (use "git add <file>..." to include in what will be committed) 1.txt nothing added to commit but untracked files present (use "git add" to track) Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ rm 1.txt Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git rm usage: git rm [<options>] [--] <file>... -n, --dry-run dry run -q, --quiet do not list removed files --cached only remove from the index -f, --force override the up-to-date check -r allow recursive removal --ignore-unmatch exit with a zero status even if nothing matched Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git rm 1.txt fatal: pathspec '1.txt' did not match any files Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git status On branch master nothing to commit, working directory clean Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git add 1.txt Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git commit 1,txt error: pathspec '1,txt' did not match any file(s) known to git. Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git commit 1.txt Aborting commit due to empty commit message. Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git commit 1.txt Aborting commit due to empty commit message. Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git add 1.txt Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git commit 1.txt Aborting commit due to empty commit message. Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git commit -m "commit 1.txt" [master 2588ac4] commit 1.txt 1 file changed, 1 insertion(+) create mode 100644 1.txt Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ rm 1.txt Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ ls -l total 2 -rw-r--r-- 1 Administrator None 12 九月 19 13:44 LICENES.txt -rw-r--r-- 1 Administrator None 37 九月 19 13:41 readme.txt Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git checkout 1.txt Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ rm 1.txt Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git rm 1.txt rm '1.txt' Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git checkout 1.txt error: pathspec '1.txt' did not match any file(s) known to git. Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git reset HEAD 1.txt Unstaged changes after reset: D 1.txt Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git checkout 1.txt Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git rm 1.txt rm '1.txt' Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git commit Aborting commit due to empty commit message. Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git commit -m "second rm 1.txt" [master ef7c7e3] second rm 1.txt 1 file changed, 1 deletion(-) delete mode 100644 1.txt Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git reset 1.txt fatal: ambiguous argument '1.txt': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git add 1.txt Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git rm 1.txt error: the following file has changes staged in the index: 1.txt (use --cached to keep the file, or -f to force removal) Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ rm 1.txt Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git rm 1.txt rm '1.txt' Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git checkout 1.txt error: pathspec '1.txt' did not match any file(s) known to git. Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git reset HEAD 1.txt Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git checkout 1.txt error: pathspec '1.txt' did not match any file(s) known to git. Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git reset 1.txt fatal: ambiguous argument '1.txt': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ ssh-keygen -t rsa -C "xxx@qq.com" Generating public/private rsa key pair. Enter file in which to save the key (/c/Users/Administrator/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /c/Users/Administrator/.ssh/id_rsa. Your public key has been saved in /c/Users/Administrator/.ssh/id_rsa.pub. The key fingerprint is: SHA256:xxx xxx@qq.com The key's randomart image is: +---[RSA 2048]----+ | o .o.o.o.. | | o + . .o.o= . . .| | o = .o.oo + o =.| | .o.o.o . o o o o =| | o+S.o. o .oo| | ++. .o.+ . =o| | ..= +o.o. .E +| | *o= o.o.. +.| | o+=...o .o.o. +| +----[SHA256]-----+ Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git remote add origin git@github.com:Francecil/InertailNavigation.git Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $ git push -u origin master The authenticity of host 'github.com (192.30.252.129)' can't be established. RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8. Are you sure you want to continue connecting (yes/no)? y Please type 'yes' or 'no': yes Warning: Permanently added 'github.com,192.30.252.129' (RSA) to the list of known hosts. Counting objects: 14, done. Delta compression using up to 4 threads. Compressing objects: 100% (7/7), done. Writing objects: 100% (14/14), 1.13 KiB | 0 bytes/s, done. Total 14 (delta 1), reused 0 (delta 0) To git@github.com:Francecil/InertailNavigation.git * [new branch] master -> master Branch master set up to track remote branch master from origin. Administrator@2013-20131003RY MINGW64 /e/github/indoor (master) $
today lazy . tomorrow die .