zoukankan      html  css  js  c++  java
  • 初次使用github

    http://wuyuans.com/2012/05/github-simple-tutorial/


    加单个文件,并提交

    $ git add README
    $ git commit -m 'second commit'
    $ git remote add origin git@github.com:yourName/yourRepo.git
    $ git push -u origin master #[-u | --set-upstream]

    加所有文件
    $ git add -A #-A是all的意思
    $ git commit -m 'second commit' #-m是给出message,不是modify
    $ git push -u origin master


    修改文件后
    git add -u #-u是 update的意思
    git status
    git commit -m 'third test'
    git push -u origin master

    利用.gitignore来忽略文件。

    在.git文件夹里新建.gitignore文件。

    可以写文件夹,也可以写文件名。

    .gitignore
    *.cache
    *.suo

    (http://blog.sina.com.cn/s/blog_81fe9f94010182uz.html)

    如果之前已经将一些文件用git add进行跟踪了,需要利用git rm –cached -r <path>先将其删除。

    git rm --cache -r .httpd.conf

    git rm --cache -r project.suo

    之后再用git add -u.

    这样就不会跟踪这些文件了。

    你可以运行`git reset FILE`, 他可以将File从当前要提交的文件集合中移除。而且不会改变任何信息。

    http://www.stackenqueue.com/questions/108/git-add-%E6%92%A4%E9%94%80

    git 删除已删除文件

     http://www.cnblogs.com/wangkangluo1/archive/2012/02/04/2337702.html

    Update: If you only want to add deleted files, try:

    git ls-files --deleted | xargs git rm | git commit

    git ls-files --modified

    git ls-files --others

  • 相关阅读:
    ZT等占空比任意整数分频器的verilog语言实现
    并行输入的CRC32校验算法
    在Quartus II_10.1上跑一个用ModelSim仿真的简单例子
    QUARTUS II_10.1安装步骤
    ZT基于FPGA的CRC校验码生成器
    2013.09.17学习计划
    外设capsense的简单调用
    OrCAD学习笔记1
    路程之相遇问题
    ZT电路板设计软件及公司知识普及
  • 原文地址:https://www.cnblogs.com/hurner/p/2922095.html
Copyright © 2011-2022 走看看