git的使用方法记录

git的使用方法记录

guo@guo-PC MINGW64 ~/Desktop/gg
$ ssh-keygen -t rsa -C “youremail@example.com”
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/guo/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/guo/.ssh/id_rsa.
Your public key has been saved in /c/Users/guo/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:pDqaFE1dMiQH0s/qc5EfK3KqUGa8Y2OqpjjqH3JmW48 youremail@example.com
The key’s randomart image is:
+—[RSA 2048]—-+
|  ..oo= .        |
|   ..+ +         |
|    .o. .        |
| . o  oo         |
|  * ….S        |
| + o..o .        |
|..B*o. o o       |
|oB==B.* o        |
|%o=+.E o         |
+—-[SHA256]—–+

guo@guo-PC MINGW64 ~/Desktop/gg
$

guo@guo-PC MINGW64 ~/Desktop/gg
$

guo@guo-PC MINGW64 ~/Desktop/gg
$

guo@guo-PC MINGW64 ~/Desktop/gg
$ clone git@git.coding.net:xuying/lesson1.git
bash: clone: command not found

guo@guo-PC MINGW64 ~/Desktop/gg
$

guo@guo-PC MINGW64 ~/Desktop/gg
$

guo@guo-PC MINGW64 ~/Desktop/gg
$ git init
Initialized empty Git repository in C:/Users/guo/Desktop/gg/.git/

guo@guo-PC MINGW64 ~/Desktop/gg (master)
$ clone git@git.coding.net:xuying/lesson1.git
bash: clone: command not found

guo@guo-PC MINGW64 ~/Desktop/gg (master)
$ git clone lone: command not found
fatal: Too many arguments.

usage: git clone [<options>] [–] <repo> [<dir>]

    -v, –verbose         be more verbose
    -q, –quiet           be more quiet
    –progress            force progress reporting
    -n, –no-checkout     don’t create a checkout
    –bare                create a bare repository
    –mirror              create a mirror repository (implies bare)
    -l, –local           to clone from a local repository
    –no-hardlinks        don’t use local hardlinks, always copy
    -s, –shared          setup as shared repository
    –recurse-submodules[=<pathspec>]
                          initialize submodules in the clone
    -j, –jobs <n>        number of submodules cloned in parallel
    –template <template-directory>
                          directory from which templates will be used
    –reference <repo>    reference repository
    –reference-if-able <repo>
                          reference repository
    –dissociate          use –reference only while cloning
    -o, –origin <name>   use <name> instead of ‘origin’ to track upstream
    -b, –branch <branch>
                          checkout <branch> instead of the remote’s HEAD
    -u, –upload-pack <path>
                          path to git-upload-pack on the remote
    –depth <depth>       create a shallow clone of that depth
    –shallow-since <time>
                          create a shallow clone since a specific time
    –shallow-exclude <revision>
                          deepen history of shallow clone, excluding rev
    –single-branch       clone only one branch, HEAD or –branch
    –shallow-submodules  any cloned submodules will be shallow
    –separate-git-dir <gitdir>
                          separate git dir from working tree
    -c, –config <key=value>
                          set config inside the new repository
    -4, –ipv4            use IPv4 addresses only
    -6, –ipv6            use IPv6 addresses only

guo@guo-PC MINGW64 ~/Desktop/gg (master)
$

guo@guo-PC MINGW64 ~/Desktop/gg (master)
$ git clone lone: command not found
fatal: Too many arguments.

usage: git clone [<options>] [–] <repo> [<dir>]

    -v, –verbose         be more verbose
    -q, –quiet           be more quiet
    –progress            force progress reporting
    -n, –no-checkout     don’t create a checkout
    –bare                create a bare repository
    –mirror              create a mirror repository (implies bare)
    -l, –local           to clone from a local repository
    –no-hardlinks        don’t use local hardlinks, always copy
    -s, –shared          setup as shared repository
    –recurse-submodules[=<pathspec>]
                          initialize submodules in the clone
    -j, –jobs <n>        number of submodules cloned in parallel
    –template <template-directory>
                          directory from which templates will be used
    –reference <repo>    reference repository
    –reference-if-able <repo>
                          reference repository
    –dissociate          use –reference only while cloning
    -o, –origin <name>   use <name> instead of ‘origin’ to track upstream
    -b, –branch <branch>
                          checkout <branch> instead of the remote’s HEAD
    -u, –upload-pack <path>
                          path to git-upload-pack on the remote
    –depth <depth>       create a shallow clone of that depth
    –shallow-since <time>
                          create a shallow clone since a specific time
    –shallow-exclude <revision>
                          deepen history of shallow clone, excluding rev
    –single-branch       clone only one branch, HEAD or –branch
    –shallow-submodules  any cloned submodules will be shallow
    –separate-git-dir <gitdir>
                          separate git dir from working tree
    -c, –config <key=value>
                          set config inside the new repository
    -4, –ipv4            use IPv4 addresses only
    -6, –ipv6            use IPv6 addresses only

guo@guo-PC MINGW64 ~/Desktop/gg (master)
$

guo@guo-PC MINGW64 ~/Desktop/gg (master)
$ lone: command not found
bash: lone:: command not found

guo@guo-PC MINGW64 ~/Desktop/gg (master)
$

guo@guo-PC MINGW64 ~/Desktop/gg (master)
$ ls

guo@guo-PC MINGW64 ~/Desktop/gg (master)
$ git clone git@git.coding.net:xuying/lesson1.git
Cloning into ‘lesson1’…
The authenticity of host ‘git.coding.net (123.59.85.69)’ can’t be established
RSA key fingerprint is SHA256:jok3FH7q5LJ6qvE7iPNehBgXRw51ErE77S0Dn+Vg/Ik.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘git.coding.net,123.59.85.69’ (RSA) to the list ofown hosts.
remote: Counting objects: 33, done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 33 (delta 8), reused 0 (delta 0)
Receiving objects: 100% (33/33), done.
Resolving deltas: 100% (8/8), done.

guo@guo-PC MINGW64 ~/Desktop/gg (master)
$ ls
lesson1/

guo@guo-PC MINGW64 ~/Desktop/gg (master)
$ cd lesson1/

guo@guo-PC MINGW64 ~/Desktop/gg/lesson1 (master)
$ ls
1.js

guo@guo-PC MINGW64 ~/Desktop/gg/lesson1 (master)
$ git checkout -b writeNameFun
Switched to a new branch ‘writeNameFun’

guo@guo-PC MINGW64 ~/Desktop/gg/lesson1 (writeNameFun)
$ git add .

guo@guo-PC MINGW64 ~/Desktop/gg/lesson1 (writeNameFun)
$ git commit -m’老郭修改’
[writeNameFun d7bb1cf] 老郭修改
 1 file changed, 16 insertions(+)
 create mode 100644 guodongsheng.js

guo@guo-PC MINGW64 ~/Desktop/gg/lesson1 (writeNameFun)
$ git checkout master
Switched to branch ‘master’
Your branch is up-to-date with ‘origin/master’.

guo@guo-PC MINGW64 ~/Desktop/gg/lesson1 (master)
$ git branch
* master
  writeNameFun

guo@guo-PC MINGW64 ~/Desktop/gg/lesson1 (master)
$ git megre writeNameFun

git: ‘megre’ is not a git command. See ‘git –help’.

Did you mean this?
        merge

guo@guo-PC MINGW64 ~/Desktop/gg/lesson1 (master)
$

guo@guo-PC MINGW64 ~/Desktop/gg/lesson1 (master)
$ git push origin writeNameFun
Merge made by the ‘recursive’ strategy. key for IP address ‘123.59.85.131’ to 1.js | 16 ++++++++++++++–
 1 file changed, 14 insertions(+), 2 deletions(-)

guo@guo-PC MINGW64 ~/Desktop/gg/lesson1 (master)
$ ^C


为的是让自己看

 

git的使用方法记录

相关文章:

你感兴趣的文章:

标签云: