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. Spring boot注解使用

    1:@SpringBootApplication 注解 a:scanBasePackages 与scanBasePackageClasses配置Spring启动时扫描的包路径或者扫描的字节码文件 b: ...

  2. 使用docker搭建hadoop环境,并配置伪分布式模式

    docker 1.下载docker镜像 docker pull registry.cn-hangzhou.aliyuncs.com/kaibb/hadoop:latest 注:此镜像为阿里云个人上传镜 ...

  3. php面试流程

  4. 流式套接字:基于TCP协议的Socket网络编程(案例3)

    案例:在案例1的基础上将传输的字符串换成具体的对象. 客户端代码: package com.yh.SocketObject; import java.io.IOException; import ja ...

  5. docker-machine create -d generic 运行的波折过程及遇见的问题

    这是一个愚蠢的学习过程,但是因为觉得过程还是值得记录的,还是写了下来 2>driver = generic 1)在这个过程中使用的都是本地的mac系统,然后尝试在mac本地create -d g ...

  6. 使用docker-compose运行Django

    1.新建空目录 2.进入该目录新建Dockerfile文件,并在该Dockerfile文件添加如下内容 FROM python:3 ENV PYTHONUNBUFFERED 1 RUN mkdir / ...

  7. Jenkins与Github集成

    Jenkins目前是手动进行项目构建的,如何才能做到Github并持续集成呢? 配置前要求: 1.Jenkins已经安装Github插件 2.Jenkins服务器已经拥有一个公网IP地址 第一步:配置 ...

  8. Python2.7-heapq

    heapq 模块,实现了堆序列算法,也叫优先序列算法.heap(堆)是每个父节点都小于等于子节点的树,同时所有节点k都满足 heap[k] <= heap[2*k+1] 和 heap[k] &l ...

  9. nodeSelector + deamonset

    DaemonSet 配置文件的语法和结构与 Deployment 几乎完全一样,只是将 kind 设为 DaemonSet. 选择运行节点:当指定.spec.template.spec.nodeSel ...

  10. 关于ST-Link下载STM32程序的使用

    ST-Link非常好用,既可以像JLINK那样在软件中直接下载,,也可以下载Hex文件, 自己买的这种,,,, 其实就是SWD下载模式 安装驱动 所有用到的 链接:http://pan.baidu.c ...