Administrator@-20131003RY MINGW64 ~
$ pwd
/c/Users/Administrator Administrator@-20131003RY MINGW64 ~
$ cd e:/ Administrator@-20131003RY MINGW64 /e
$ pwd
/e Administrator@-20131003RY MINGW64 /e
$ cd github Administrator@-20131003RY MINGW64 /e/github
$ mkdir indoor Administrator@-20131003RY MINGW64 /e/github
$ cd indoor Administrator@-20131003RY MINGW64 /e/github/indoor
$ git init
Initialized empty Git repository in E:/github/indoor/.git/ Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git add readme.txt Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ gir commit -m "wrote a readme file "
bash: gir: command not found Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git commit -m "wrote a readme file "
[master (root-commit) 3792c32] wrote a readme file
file changed, insertion(+)
create mode readme.txt Administrator@-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@-20131003RY MINGW64 /e/github/indoor (master)
$ git diff readme.txt
diff --git a/readme.txt b/readme.txt
index f7a8387..235b502
--- a/readme.txt
+++ b/readme.txt
@@ - +, @@
-<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@-20131003RY MINGW64 /e/github/indoor (master)
$ git add readme.txt Administrator@-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@-20131003RY MINGW64 /e/github/indoor (master)
$ git commit -m "add distributed go commit"
[master 5f87ecf] add distributed go commit
file changed, insertions(+), deletion(-) Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git status
On branch master
nothing to commit, working directory clean Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git log --pretty=oneline
5f87ecf99fe738341233181f2cb176e0fc249971 add distributed go commit
3792c3284467ed426d7a2be67ff692eb510a5bbb wrote a readme file Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git reset --hard HEAD^
HEAD is now at 3792c32 wrote a readme file Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ cat readme.txt
▒▒▒▒ ʹ▒▒git ▒ͻ▒▒▒
Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git log
commit 3792c3284467ed426d7a2be67ff692eb510a5bbb
Author: Francecil <@qq.com>
Date: Sat Sep :: + wrote a readme file Administrator@-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@-20131003RY MINGW64 /e/github/indoor (master)
$ git reset --hard 5f87ecf
HEAD is now at 5f87ecf add distributed go commit Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git log
commit 5f87ecf99fe738341233181f2cb176e0fc249971
Author: Francecil <@qq.com>
Date: Sat Sep :: + add distributed go commit commit 3792c3284467ed426d7a2be67ff692eb510a5bbb
Author: Francecil <@qq.com>
Date: Sat Sep :: + wrote a readme file Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git reflog
5f87ecf HEAD@{}: reset: moving to 5f87ecf
3792c32 HEAD@{}: reset: moving to HEAD^
5f87ecf HEAD@{}: commit: add distributed go commit
3792c32 HEAD@{}: commit (initial): wrote a readme file Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git log
commit 5f87ecf99fe738341233181f2cb176e0fc249971
Author: Francecil <@qq.com>
Date: Sat Sep :: + add distributed go commit commit 3792c3284467ed426d7a2be67ff692eb510a5bbb
Author: Francecil <@qq.com>
Date: Sat Sep :: + wrote a readme file Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ cat readme.txt
测试 使用git 客户端
第二行
Administrator@-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@-20131003RY MINGW64 /e/github/indoor (master)
$ git diff
diff --git a/readme.txt b/readme.txt
index 235b502..141e7b4
--- a/readme.txt
+++ b/readme.txt
@@ -, +, @@
-<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@-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@-20131003RY MINGW64 /e/github/indoor (master)
$ git add readme.txt Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git add LICENES.txt Administrator@-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@-20131003RY MINGW64 /e/github/indoor (master)
$ git commit -m "understand how stage works"
[master 45b7b4d] understand how stage works
files changed, insertions(+), deletions(-)
create mode LICENES.txt Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git status
On branch master
nothing to commit, working directory clean Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git status
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed) .txt nothing added to commit but untracked files present (use "git add" to track) Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ rm .txt Administrator@-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@-20131003RY MINGW64 /e/github/indoor (master)
$ git rm .txt
fatal: pathspec '1.txt' did not match any files Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git status
On branch master
nothing to commit, working directory clean Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git add .txt Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git commit ,txt
error: pathspec '1,txt' did not match any file(s) known to git.
Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git commit .txt
Aborting commit due to empty commit message. Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git commit .txt
Aborting commit due to empty commit message. Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git add .txt Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git commit .txt
Aborting commit due to empty commit message. Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git commit -m "commit 1.txt"
[master 2588ac4] commit .txt
file changed, insertion(+)
create mode .txt Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ rm .txt Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ ls -l
total
-rw-r--r-- Administrator None 九月 : LICENES.txt
-rw-r--r-- Administrator None 九月 : readme.txt Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git checkout .txt Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ rm .txt Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git rm .txt
rm '1.txt' Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git checkout .txt
error: pathspec '1.txt' did not match any file(s) known to git. Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git reset HEAD .txt
Unstaged changes after reset:
D .txt Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git checkout .txt Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git rm .txt
rm '1.txt' Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git commit
Aborting commit due to empty commit message. Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git commit -m "second rm 1.txt"
[master ef7c7e3] second rm .txt
file changed, deletion(-)
delete mode .txt Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git reset .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@-20131003RY MINGW64 /e/github/indoor (master)
$ git add .txt Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git rm .txt
error: the following file has changes staged in the index:
.txt
(use --cached to keep the file, or -f to force removal) Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ rm .txt Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git rm .txt
rm '1.txt' Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git checkout .txt
error: pathspec '1.txt' did not match any file(s) known to git. Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git reset HEAD .txt Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git checkout .txt
error: pathspec '1.txt' did not match any file(s) known to git. Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git reset .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@-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 ]----+
| 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@-20131003RY MINGW64 /e/github/indoor (master)
$ Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$ git remote add origin git@github.com:Francecil/InertailNavigation.git Administrator@-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: , done.
Delta compression using up to threads.
Compressing objects: % (/), done.
Writing objects: % (/), 1.13 KiB | bytes/s, done.
Total (delta ), reused (delta )
To git@github.com:Francecil/InertailNavigation.git
* [new branch] master -> master
Branch master set up to track remote branch master from origin. Administrator@-20131003RY MINGW64 /e/github/indoor (master)
$

mark1-git的更多相关文章

  1. Git 子模块 - submodule

    有种情况我们经常会遇到:某个工作中的项目需要包含并使用另一个项目. 也许是第三方库,或者你 独立开发的,用于多个父项目的库. 现在问题来了:你想要把它们当做两个独立的项目,同时又想在 一个项目中使用另 ...

  2. Git 在团队中的最佳实践--如何正确使用Git Flow

    我们已经从SVN 切换到Git很多年了,现在几乎所有的项目都在使用Github管理, 本篇文章讲一下为什么使用Git, 以及如何在团队中正确使用. Git的优点 Git的优点很多,但是这里只列出我认为 ...

  3. Git与Repo入门

    版本控制 版本控制是什么已不用在说了,就是记录我们对文件.目录或工程等的修改历史,方便查看更改历史,备份以便恢复以前的版本,多人协作... 一.原始版本控制 最原始的版本控制是纯手工的版本控制:修改文 ...

  4. Git Bash的一些命令和配置

    查看git版本号: git --version 如果是第一次使用Git,你需要设置署名和邮箱: $ git config --global user.name "用户名" $ gi ...

  5. 在Ubuntu 16.10 安装 git 并上传代码至 git.oschina.net

    1. 注册一个账号和创建项目 先在git.oschina.net上注册一个账号和新建一个project ,如project name 是"myTest". 2.安装git sudo ...

  6. 史上最详细git教程

    题外话 虽然这个标题很惊悚,不过还是把你骗进来了,哈哈-各位看官不要着急,耐心往下看 Git是什么 Git是目前世界上最先进的分布式版本控制系统. SVN与Git的最主要的区别 SVN是集中式版本控制 ...

  7. [版本控制之道] Git 常用的命令总结(欢迎收藏备用)

    坚持每天学习,坚持每天复习,技术永远学不完,自己永远要前进 总结日常开发生产中常用的Git版本控制命令 ------------------------------main-------------- ...

  8. 【解决方案】Myeclipse 10 安装 GIT 插件 集成 步骤 图解

    工程开发中,往往要使用到集成GIT ,那么下面说说插件安装步骤 PS:以Myeclipse 10 为例,讲解集成安装步骤. ----------------------main------------ ...

  9. git 命令

    切换仓库地址: git remote set-url origin xxx.git切换分支:git checkout name撤销修改:git checkout -- file删除文件:git rm  ...

  10. git亲测命令

    一.Git新建本地分支与远程分支关联问题 git checkout -b branch_name origin/branch_name 或者 git branch --set-upstream bra ...

随机推荐

  1. python第二十九课——文件读写(读取数据操作)

    演示读取数据操作:path=r'a.txt' 1.打开文件f1=open(path,'r') 2.读取数据content1=f1.read(3)print(content1) content1=f1. ...

  2. 关于JRebel启动tomcat访问上次工程的index.jsp

    检查了一下,原来我把上次配置文件包括JRebel配置文件一起复制过来,用JRebel启动时tomcat访问JRebel配置文件的目录下 这个是我上次文件的路径,把JRebel配置文件删除了,然后 di ...

  3. HackerRake平台说明和介绍

    这是之前调研的时候稍微做了一个大致的总结,现在将其分享出去,感觉放在自己的文档管理库中,用处有限.分享出去,说不定能给一些朋友带来有益的启发. 另外我们团队最近也在考虑开发OJ平台.HackerRak ...

  4. leetcode62—Unique Paths

    A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The ...

  5. URL Encode

    用VC实现post数据常常会遇到URL编码问题 在此封装一个工具类进行UTF8编码的转换 源码来自php source code 只是简单的封装给C++调用   //URL 编解码类 //来自PHP源 ...

  6. 基于Azure的软件部署和开发系列沙龙

    活动简介: Azure是一种灵活和支持互操作的平台,它可以被用来创建云中运行的应用或者通过基于云的特性来加强现有应用.它开放式的架构给开发者提供了Web应用.互联设备的应用.个人电脑.服务器.或者提供 ...

  7. 滚动条ScrollViewer防止滚动时按内容跳跃式滚动的设置

    原文:滚动条ScrollViewer防止滚动时按内容跳跃式滚动的设置 属性中将CanContentScroll设置为False,滚动时就不会跳了,会连续的滚动

  8. Luogu P1972 [SDOI2009]HH的项链

    很清新自然凶猛的数据结构题,都是套路啊 我们可以考虑离线做,先把区间按右端点从小到大排序 首先注意到一种贝壳如果在一段中出现超过1次,那么它在前面或后面就无关紧要了 举一个例子: 对于数列1 2 3 ...

  9. mfc 进程的诞生和死亡

     进程概念  进程的诞生  进程的死亡 一. 进程: .简单的说 双击一个EXE图标时,系统就会产生一个相应的进程,分配相应的资源,并执行相应的代码. .标准一些的说法: 进程是一个具有独立功能 ...

  10. WinDbg命令三部曲

    WinDbg 命令三部曲:(一)WinDbg 命令手册 WinDbg 命令三部曲:(二)WinDbg SOS 扩展命令手册 WinDbg 命令三部曲:(三)WinDbg SOSEX 扩展命令手册