mark1-git
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的更多相关文章
- Git 子模块 - submodule
有种情况我们经常会遇到:某个工作中的项目需要包含并使用另一个项目. 也许是第三方库,或者你 独立开发的,用于多个父项目的库. 现在问题来了:你想要把它们当做两个独立的项目,同时又想在 一个项目中使用另 ...
- Git 在团队中的最佳实践--如何正确使用Git Flow
我们已经从SVN 切换到Git很多年了,现在几乎所有的项目都在使用Github管理, 本篇文章讲一下为什么使用Git, 以及如何在团队中正确使用. Git的优点 Git的优点很多,但是这里只列出我认为 ...
- Git与Repo入门
版本控制 版本控制是什么已不用在说了,就是记录我们对文件.目录或工程等的修改历史,方便查看更改历史,备份以便恢复以前的版本,多人协作... 一.原始版本控制 最原始的版本控制是纯手工的版本控制:修改文 ...
- Git Bash的一些命令和配置
查看git版本号: git --version 如果是第一次使用Git,你需要设置署名和邮箱: $ git config --global user.name "用户名" $ gi ...
- 在Ubuntu 16.10 安装 git 并上传代码至 git.oschina.net
1. 注册一个账号和创建项目 先在git.oschina.net上注册一个账号和新建一个project ,如project name 是"myTest". 2.安装git sudo ...
- 史上最详细git教程
题外话 虽然这个标题很惊悚,不过还是把你骗进来了,哈哈-各位看官不要着急,耐心往下看 Git是什么 Git是目前世界上最先进的分布式版本控制系统. SVN与Git的最主要的区别 SVN是集中式版本控制 ...
- [版本控制之道] Git 常用的命令总结(欢迎收藏备用)
坚持每天学习,坚持每天复习,技术永远学不完,自己永远要前进 总结日常开发生产中常用的Git版本控制命令 ------------------------------main-------------- ...
- 【解决方案】Myeclipse 10 安装 GIT 插件 集成 步骤 图解
工程开发中,往往要使用到集成GIT ,那么下面说说插件安装步骤 PS:以Myeclipse 10 为例,讲解集成安装步骤. ----------------------main------------ ...
- git 命令
切换仓库地址: git remote set-url origin xxx.git切换分支:git checkout name撤销修改:git checkout -- file删除文件:git rm ...
- git亲测命令
一.Git新建本地分支与远程分支关联问题 git checkout -b branch_name origin/branch_name 或者 git branch --set-upstream bra ...
随机推荐
- Markdown基本语法规范
1. 标题 #的个数即表示Hn, 一下依次从h1~h6. 也可在句尾添加同样个数的#(也可忽略) # This is H1 ## This is H2 ### This is H3 #### Thi ...
- Netty入门(四)ByteBuf 字节级别的操作
Netty 中使用 ByteBuf 代替 Java NIO 提供的 ByteBuffer 作为字节的容器. 一.索引 ByteBuf 提供两个指针变量支持读和写操作,读操作使用 readerInde ...
- python面试题库——3数据库和缓存
第三部分 数据库和缓存(46题) 列举常见的关系型数据库和非关系型都有那些? 关系型数据库: Oracle.DB2.Microsoft SQL Server.Microsoft Access.MySQ ...
- MyBatis实战之解析与运行
本次所谈的原理仅仅只涉及基本的框架和核心代码,并不会全部都说到,比如关于MyBatis是如何解析XML文件和其他配置文件从而的到内容,还有就是JDBC如何使用,关于JDBC如何使用,可以参考我的这篇博 ...
- WorldWind源码剖析系列:相机类CameraBase
相机基类CameraBase PluginSDK中的相机类CameraBase是三维计算机图形学中的概念.观察者在三维场景中漫游时,通过眼睛看到的场景和相机拍摄过程非常一致.实际上,Direct3D和 ...
- springbatch入门练习(第一篇)
先搞懂几个概念 Job Respository: 作业仓库,负责Job.Step执行过程中的状态保存 Job launcher: 作业调度器,提供执行Job的入口 Job:作业,由多个step组成,封 ...
- 动态代理实现设置tomcat请求编码
1)htmlcode: <html> <head> <title>$Title$</title> </head> <body> ...
- linux中分区、格式化文件系统、挂载
以前学linux的时候,毕竟自己没搞运维,就只注重了很多命令的运用,没太在意文件系统这块.买了本linux的书,这部分看了点东西,记个笔记哈哈. 有个场景,比如说我们现在的服务器上存储不够用了,那么当 ...
- 解决EF使用context.Database.SqlQuery时NotMapped属性列为空null的问题(转载)
有时候我们要为EF中的Model加一个新属性,这个属性不是数据库中的字段,而是从其它表中关联出来的.EF中要标示一个列不是对应表中字段只需要加上NotMapped特性.要使用NotMapped,保证你 ...
- 20155325 Exp8 Web基础
实验要求 (1).Web前端HTML(0.5分) 能正常安装.启停Apache.理解HTML,理解表单,理解GET与POST方法,编写一个含有表单的HTML. (2).Web前端javascipt(0 ...