[email protected]2013-20131003RY MINGW64 ~ $ pwd /c/Users/Administrator [email protected]2013-20131003RY MINGW64 ~ $ cd e:/ [email protected]2013-20131003RY MINGW64 /e $ pwd /e [email protected]2013-20131003RY MINGW64 /e $ cd github [email protected]2013-20131003RY MINGW64 /e/github $ mkdir indoor [email protected]2013-20131003RY MINGW64 /e/github $ cd indoor [email protected]2013-20131003RY MINGW64 /e/github/indoor $ git init Initialized empty Git repository in E:/github/indoor/.git/ [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git add readme.txt [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ gir commit -m "wrote a readme file " bash: gir: command not found [email protected]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 [email protected]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") [email protected]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 [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git add readme.txt [email protected]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 [email protected]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(-) [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git status On branch master nothing to commit, working directory clean [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git log --pretty=oneline 5f87ecf99fe738341233181f2cb176e0fc249971 add distributed go commit 3792c3284467ed426d7a2be67ff692eb510a5bbb wrote a readme file [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git reset --hard HEAD^ HEAD is now at 3792c32 wrote a readme file [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ cat readme.txt ???? ???git ????? [email protected]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 [email protected]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>...]‘ [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git reset --hard 5f87ecf HEAD is now at 5f87ecf add distributed go commit [email protected]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 [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git reflog 5f87ecf [email protected]{0}: reset: moving to 5f87ecf 3792c32 [email protected]{1}: reset: moving to HEAD^ 5f87ecf [email protected]{2}: commit: add distributed go commit 3792c32 [email protected]{3}: commit (initial): wrote a readme file [email protected]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 [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ cat readme.txt 测试 使用git 客户端 第二行 [email protected]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") [email protected]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 [email protected]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") [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git add readme.txt [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git add LICENES.txt [email protected]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 [email protected]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 [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git status On branch master nothing to commit, working directory clean [email protected]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) [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ rm 1.txt [email protected]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 [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git rm 1.txt fatal: pathspec ‘1.txt‘ did not match any files [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git status On branch master nothing to commit, working directory clean [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git add 1.txt [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git commit 1,txt error: pathspec ‘1,txt‘ did not match any file(s) known to git. [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git commit 1.txt Aborting commit due to empty commit message. [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git commit 1.txt Aborting commit due to empty commit message. [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git add 1.txt [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git commit 1.txt Aborting commit due to empty commit message. [email protected]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 [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ rm 1.txt [email protected]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 [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git checkout 1.txt [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ rm 1.txt [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git rm 1.txt rm ‘1.txt‘ [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git checkout 1.txt error: pathspec ‘1.txt‘ did not match any file(s) known to git. [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git reset HEAD 1.txt Unstaged changes after reset: D 1.txt [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git checkout 1.txt [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git rm 1.txt rm ‘1.txt‘ [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git commit Aborting commit due to empty commit message. [email protected]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 [email protected]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>...]‘ [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git add 1.txt [email protected]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) [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ rm 1.txt [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git rm 1.txt rm ‘1.txt‘ [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git checkout 1.txt error: pathspec ‘1.txt‘ did not match any file(s) known to git. [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git reset HEAD 1.txt [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git checkout 1.txt error: pathspec ‘1.txt‘ did not match any file(s) known to git. [email protected]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>...]‘ [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ ssh-keygen -t rsa -C "[email protected]" 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]-----+ [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $ git remote add origin [email protected]:Francecil/InertailNavigation.git [email protected]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 [email protected]:Francecil/InertailNavigation.git * [new branch] master -> master Branch master set up to track remote branch master from origin. [email protected]2013-20131003RY MINGW64 /e/github/indoor (master) $
时间: 2024-10-19 02:46:18