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 ...
随机推荐
- CSS3 新增的文本属性
一.CSS1&2中的文本属性(W3C标准) text-indent CSS1 检索或设置对象中的文本的缩进 letter-spacing CSS1 检索或设置对象中的文字之间的间隔 word- ...
- [luogu3980] 志愿者招募
题面 又一次考试网络流爆零...... 这一题一看就是网络流, 但是要怎么构图呢? 考虑到途中的一些因素, 首先, 每一种志愿者控制的区间范围为\(S_{i}\)到\(T_{i}\), 所以, ...
- numpy库数组拼接np.concatenate的用法
concatenate功能:数组拼接 函数定义:numpy.concatenate((a1, a2, ...), axis=0, out=None)
- Python2.7-canlendar
calendar模块的主要功能是针对万年历.星期几的,此外模块内还有方便的判断闰年.获取月份名.星期名的方法 1.模块的类 1.1.calendar.Calendar([firstweekday]) ...
- aips初步设想
2018年5月10日星期四 目标:设计一个高并发,高性能,可扩展的现代化综合大前置机. 具备以下功能: 协议支持:http.socket.mq 报文支持:xml.json.8583 Tps:500笔/ ...
- SQL 登录名 用户 角色
参考博客:http://www.cnblogs.com/ChineseMoonGod/p/5860449.html,非常感谢博主的知识分享. 1.创建一个登录名,完全操作数据库权限,步骤为:创建登录名 ...
- DM9161 和 STM32F107 和 FreeRTOS 和 LWIP
1.首先移植 FreeRTOS到 107上 可以正常运行. 可以到群下载移植好的,文件名称:STM32F107VC+FreeRTOS V8.2.3+kfifo(巧夺天工)! 2.第二步 :ST 官方 ...
- Hadoop、Yarn和vcpu资源的配置
转载自:https://www.cnblogs.com/S-tec-songjian/p/5740691.html Hadoop YARN同时支持内存和CPU两种资源的调度(默认只支持内存,如果想进 ...
- Patchwork(2013年)--CNV检测方法流程
文章题目:Patchwork: allele-specific copy number analysis of whole-genome sequenced tumor tissue 特点: 可以检测 ...
- PCIE_DMA实例四:xapp1052在Xilinx 7系列(KC705/VC709)FPGA上的移植
PCIE_DMA实例四:xapp1052在Xilinx 7系列(KC705/VC709)FPGA上的移植 一:前言 这段时间有个朋友加微信请求帮忙调试一块PCIe采集卡.该采集卡使用xilinx xc ...