美文网首页
git 自己使用心得(1)主线程 mac

git 自己使用心得(1)主线程 mac

作者: long186 | 来源:发表于2018-04-24 14:24 被阅读0次

    1.创建一个文件夹存储远程仓库的内容

    2.存储远程仓库的内容 ( cd “手拖文件就是文件地址” )

    3.下载远程仓库内容  $git clone “git地址”

    4.把新内容添加到 文件跟踪  $git add “内容”    (git reset HEAD 上一次add里面取消)

    5.验证状态 $git status(Changes to be committed:已经在 stage区可以commit)

    6.本地文件提交 $git commit -m “修改的内容”

    7.添加至远程仓库 $git push

    如果出现 E325: ATTENTION

     Found a swap file by the name ".git/.COMMIT_EDITMSG.swp"

              owned by: X  dated: Wed Jan 23 16:01:06 2013

            file name: ~X/Sites/mysite/.git/COMMIT_EDITMSG

              modified: no

            user name: X  host name: X-2.local

            process ID: 77109

    While opening file ".git/COMMIT_EDITMSG"

                dated: Thu Jan 24 16:22:48 2013

          NEWER than swap file!

    (1) Another program may be editing the same file.

        If this is the case, be careful not to end up with two

        different instances of the same file when making changes.

        Quit, or continue with caution.

    (2) An edit session for this file crashed.

        If this is the case, use ":recover" or "vim -r .git/COMMIT_EDITMSG"

        to recover the changes (see ":help recovery").

        If you did this already, delete the swap file ".git/.COMMIT_EDITMSG.swp"

        to avoid this message.

    Swap file ".git/.COMMIT_EDITMSG.swp" already exists!

    [O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:

    解决 :$rm .git/.COMMIT_EDITMSG.swp

    出现 — insert— 按s进入可输入状态输入:wq!退出

    相关文章

      网友评论

          本文标题:git 自己使用心得(1)主线程 mac

          本文链接:https://www.haomeiwen.com/subject/vhkjlftx.html