zoukankan      html  css  js  c++  java
  • GitHub简单使用

    使用GitHub已经有半年时间了,但因为使用频率较低,对于这种比较抽象的东西较容易忘记,所以通过此博客总结GitHub的简单使用方法及遇到问题的解决方法。

    常用命令

    1)提交

    git add <file>//“file”即“文件名称.文件格式”
    git commit -m "information"//information即“对提交文件的描述”
    git push -u origin master//提交成功,可以前往GitHub查看
    注:“add”可以同时add多个文件,也可以在“commit”之前多次add,之后用“commit”统一提交。比如:

    $ git add file1.txt
    $ git add file2.txt file3.txt
    $ git commit -m "add 3 files."
    

    git log//用于查看提交日志
    git push//更新GitHub上的仓库

    问题及解决方法

    (1)

    $ git add readme.txt
    fatal:pathspec 'readme.txt' did not match any files
    

    解决方法:
    要添加的文件必须能找到,如果文件不存在当然无法添加了。不在当前目录需要写相对路径:
    $ git add test/readme.txt

    (2) 常见错误及解决方法网址:

    http://blog.csdn.net/qq_28055429/article/details/51007453

    GitHub使用方法持续更新。。。

  • 相关阅读:
    Android随笔
    Android随笔
    Android随笔
    Android随笔
    Android随笔
    Android随笔
    Android随笔
    Android随笔
    Android随笔
    Codeforces Round #551题解
  • 原文地址:https://www.cnblogs.com/azeLibertas/p/8931007.html
Copyright © 2011-2022 走看看