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. vue2.0学习笔记之路由(二)路由嵌套

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  2. http的长连接和短连接(数据库也一样)

    长连接与短连接 所谓长连接,指在一个TCP连接上可以连续发送多个数据包,在TCP连接保持期间,如果没有数据包发送,需要双方发检测包以维持此连接,一般需要自己做在线维持. 短连接是指通信双方有数据交互时 ...

  3. JS重构分页

    JS重构分页 很早以前写过一个Jquery分页组件,但是当时写的组件有个缺点,当时的JS插件是这样设计的:比如:点击  -->  查询按钮 ---> 发ajax请求 返回总页数和所有数据, ...

  4. Python2.7-canlendar

    calendar模块的主要功能是针对万年历.星期几的,此外模块内还有方便的判断闰年.获取月份名.星期名的方法 1.模块的类 1.1.calendar.Calendar([firstweekday]) ...

  5. 编程使用缓冲流读取试题文件,test6_5.txt 内容如下所示。 每次显示试题文件中的一道题目,读取到字符“*”时暂停读取, 等待用户从键盘输入答案。用户做完全部题目后,程序给出用户的得分。

    test6_5.txt内容如下: (1)面向对象程序设计中,把对象的属性和行为组织在同一个模块内的机制叫做( ). A.封装象 B.继承 C.抽象 D.多态 ******************** ...

  6. phpstorm开发环境搭建流程

    1.下载phpstorm 2.网上找注册码 phpstorm 8 license key Learn Programming===== LICENSE BEGIN =====63758-1204201 ...

  7. OS X 10.11无法安装cocoapods的解决办法

    前两天在给OS X 10.11 安装cocoapods时,命令行总是提示"Operation not permitted",我不管是用root用户安装还是查阅网上过去的资料都安装不 ...

  8. SonarQube配置LDAP认证集成

    1.准备工作 获取LDAP服务信息.admin账号.安装sonarldap插件. 2.LDAP配置 #LDAP settings #admin sonar.security.realm=LDAP ld ...

  9. 网络对抗技术 2017-2018-2 20152515 Exp4 恶意代码分析

    1.实验后回答问题 (1)如果在工作中怀疑一台主机上有恶意代码,但只是猜想,所有想监控下系统一天天的到底在干些什么.请设计下你想监控的操作有哪些,用什么方法来监控. 答:- 我会使用sysmon工具来 ...

  10. HTML基础之HTML标签

    前端的三把利器 HTML:赤裸的一个人 CSS:华丽的衣服 JS/JavaScript:赋予这个人的行为,也就是动起来 HTML(超文本标记语言) html代码实际上就是一套能够被浏览器所识别的规则代 ...