git链接远程仓库已经新建本地仓库

来源:互联网 发布:如何开淘宝实体店 编辑:程序博客网 时间:2024/05/16 08:26

tj@TJ-PC MINGW64 ~
$ ssh-keygen -t rsa -C "XXXX.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/tj/.ssh/id_rsa):
Created directory '/c/Users/tj/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Passphrases do not match.  Try again.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/tj/.ssh/id_rsa.
Your public key has been saved in /c/Users/tj/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The key's randomart image is:
+---[RSA 2048]----+
|            . o..|
|           . = +.|
|            = Bo.|
|         . ..#==+|
|        S o @+X+=|
|         .o=.+oB.|
|         . +o++. |
|           .+ o E|
|          .o.. . |
+----[SHA256]-----+

tj@TJ-PC MINGW64 ~
$ mkdir my-test

tj@TJ-PC MINGW64 ~
$ cd my-test


tj@TJ-PC MINGW64 ~/my-test
$ git init
Initialized empty Git repository in C:/Users/tj/my-test/.git/


tj@TJ-PC MINGW64 ~/my-test
$ git status
On branch master


Initial commit


Untracked files:
  (use "git add <file>..." to include in what will be committed)


        test_tutu3.py


nothing added to commit but untracked files present (use "git add" to track)


tj@TJ-PC MINGW64 ~/my-test
$ git add test_tutu3.py


tj@TJ-PC MINGW64 ~/my-test
$

tj@TJ-PC MINGW64 ~/my-test
$ git config --global user.name "XXXX"


tj@TJ-PC MINGW64 ~/my-test
$ git config --global user.email "XXXXXXX"


tj@TJ-PC MINGW64 ~/my-test
$ git commit -m "first commit"
[master (root-commit) 2f68998] first commit
 1 file changed, 44 insertions(+)
 create mode 100644 test_tutu3.py


tj@TJ-PC MINGW64 ~/my-test
$ git remote add origin git@git.XXXXX.XX:XXX/my-test.git


tj@TJ-PC MINGW64 ~/my-test
$ git push -u origin master
The authenticity of host 'git.XXXXX.XX,XXX.XX.XX.XX' ' can't be established.
RSA key fingerprint is SHA256:akoFll1bzp7PDYeCInSwCxBIIJIFlrf2FnJszSvFt/Y.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'git.XXXXX.XX,XXX.XX.XX.XX' (RSA) to the list of known hosts.
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 747 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To git@git.XXXXXXXX:XXXX/my-test.git
 * [new branch]      master -> master
Branch master set up to track remote branch master from origin.
原创粉丝点击