[liode@fedora:30:~/Documents/blogs]$ ssh-keygen -t rsa -C "liodegwin@gmail.com" Generating public/private rsa key pair. Enter file inwhich to save the key (/home/liode/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/liode/.ssh/id_rsa Your public key has been saved in /home/liode/.ssh/id_rsa.pub The key fingerprint is: SHA256:wACNFWp+VdJtQS5kgVMQnjfQ2gD62sPGKuMsAeERygc liodegwin@gmail.com The key's randomart image is: +---[RSA 3072]----+ | Eo==o=B*+o. | |+.oo.++Bo.o | |oo=. *=+.. | |.+.. ..o.o | |. . o S | |. * | | .. * | |= o . | |o=. | +----[SHA256]-----+
simon@DESKTOP-SLHL7P8 MINGW64 /d/MyDocument/blogs/blogs (main) $ git status On branch main Your branch is ahead of 'origin/main' by 1 commit. (use "git push" to publish your local commits)
nothing to commit, working tree clean
远程的内容覆盖本地的内容
现在本地的branch is ahead of 远程的了,将更新提交到远程
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
simon@DESKTOP-SLHL7P8 MINGW64 /d/MyDocument/blogs/blogs (main) $ git push Enumerating objects: 5, done. Counting objects: 100% (5/5), done. Delta compression using up to 12 threads Compressing objects: 100% (4/4), done. Writing objects: 100% (4/4), 1.17 KiB | 1.17 MiB/s, done. Total 4 (delta 0), reused 0 (delta 0), pack-reused 0 To github.com:liodegwin/blogs.git 18cd641..dcb49eb main -> main
simon@DESKTOP-SLHL7P8 MINGW64 /d/MyDocument/blogs/blogs (main) $ git status On branch main Your branch is up to date with 'origin/main'.