“Git cmd”的版本间的差异
(创建页面,内容为“[yuanliu2@crdc-sdn-ucs2 workspace]$ git clone git@sj-cable-gitlab.cisco.com:jasper/CIS.git Cloning into 'CIS'... Agent admitted failure to sign using the key. git@sj…”) |
|||
第19行: | 第19行: | ||
Receiving objects: 100% (4571/4571), 62.16 MiB | 6.44 MiB/s, done. | Receiving objects: 100% (4571/4571), 62.16 MiB | 6.44 MiB/s, done. | ||
Resolving deltas: 100% (2261/2261), done. | Resolving deltas: 100% (2261/2261), done. | ||
+ | |||
+ | |||
+ | $ git apply PATCH --reject | ||
+ | $ edit edit edit--------手动merge冲突 | ||
+ | (译注:$ git status) | ||
+ | $ git add FIXED_FILES | ||
+ | $ git am --resolved | ||
+ | |||
+ | 回滚 | ||
+ | git reset –hard 8ff24a6803173208f3e606e32dfcf82db9ac84d8 | ||
+ | |||
+ | git add撤销 | ||
+ | git reset HEAD 如果后面什么都不跟的话 就是上一次add 里面的全部撤销了 | ||
+ | |||
+ | |||
+ | [yuanliu2@crdc-sdn-ucs2 rpd-service-manager]$ git pull | ||
+ | error: There are still logs under '.git/logs/refs/remotes/origin/bugfix/haofan' | ||
+ | From ssh://bitbucket-eng-sjc1.cisco.com:7999/cmtsorch/rpd-service-manager | ||
+ | ! [new branch] bugfix/haofan -> origin/bugfix/haofan (unable to update local ref) | ||
+ | [yuanliu2@crdc-sdn-ucs2 rpd-service-manager]$ rm -rf .git/logs/refs/remotes/origin/bugfix/haofan | ||
+ | [yuanliu2@crdc-sdn-ucs2 rpd-service-manager]$ git fetch | ||
+ | From ssh://bitbucket-eng-sjc1.cisco.com:7999/cmtsorch/rpd-service-manager | ||
+ | * [new branch] bugfix/haofan -> origin/bugfix/haofan | ||
+ | [yuanliu2@crdc-sdn-ucs2 rpd-service-manager]$ git pull |
2018年1月15日 (一) 07:09的最新版本
[yuanliu2@crdc-sdn-ucs2 workspace]$ git clone git@sj-cable-gitlab.cisco.com:jasper/CIS.git Cloning into 'CIS'... Agent admitted failure to sign using the key. git@sj-cable-gitlab.cisco.com's password: 方法1:
重新生成SSH-key,注销再登陆系统即可 方法2:
在终端下执行命令 ssh-add
[yuanliu2@crdc-sdn-ucs2 workspace]$ ssh-add Identity added: /home/yuanliu2/.ssh/id_rsa (/home/yuanliu2/.ssh/id_rsa) [yuanliu2@crdc-sdn-ucs2 workspace]$ git clone git@sj-cable-gitlab.cisco.com:jasper/CIS.git Cloning into 'CIS'... remote: Counting objects: 4571, done. remote: Compressing objects: 100% (14/14), done. remote: Total 4571 (delta 6), reused 0 (delta 0) Receiving objects: 100% (4571/4571), 62.16 MiB | 6.44 MiB/s, done. Resolving deltas: 100% (2261/2261), done.
$ git apply PATCH --reject
$ edit edit edit--------手动merge冲突
(译注:$ git status)
$ git add FIXED_FILES
$ git am --resolved
回滚 git reset –hard 8ff24a6803173208f3e606e32dfcf82db9ac84d8
git add撤销 git reset HEAD 如果后面什么都不跟的话 就是上一次add 里面的全部撤销了
[yuanliu2@crdc-sdn-ucs2 rpd-service-manager]$ git pull
error: There are still logs under '.git/logs/refs/remotes/origin/bugfix/haofan'
From ssh://bitbucket-eng-sjc1.cisco.com:7999/cmtsorch/rpd-service-manager
! [new branch] bugfix/haofan -> origin/bugfix/haofan (unable to update local ref)
[yuanliu2@crdc-sdn-ucs2 rpd-service-manager]$ rm -rf .git/logs/refs/remotes/origin/bugfix/haofan [yuanliu2@crdc-sdn-ucs2 rpd-service-manager]$ git fetch From ssh://bitbucket-eng-sjc1.cisco.com:7999/cmtsorch/rpd-service-manager
* [new branch] bugfix/haofan -> origin/bugfix/haofan
[yuanliu2@crdc-sdn-ucs2 rpd-service-manager]$ git pull