zoukankan      html  css  js  c++  java
  • Git学习笔记(一)

    1、git clone https://github.com/miguelgrinberg/flasky.git

    cd flasky

    git checkout 1a

    2、git reset --hard放弃本地修改,不保存。

    3、

    git remote add origin git@github.com:tlikai/vimrc.git 添加远程仓库

    git fetch origin

    修改代码中。。。。

    git push origin master 提交本地修改到远程仓库master分支

    4、如果你想给别人贡献代码的话,在github上是先fork一下,然后clone到本地进行修改,然后push到自己fork的仓库中,再在github上创建一个pull request,等待作者同意并merge。

    5、

    1)Start development from a known tag

    $ git clone git://git.kernel.org/pub/scm/.../linux-2.6 my2.6
    $ cd my2.6
    $ git branch my2.6.14 v2.6.14 (1)------This step and the next one could be combined into a single step with "checkout -b my2.6.14 v2.6.14".
    $ git checkout my2.6.14

    $git add .
    $git commit

    2)Delete an unneeded branch

    $ git clone git://git.kernel.org/.../git.git my.git
    $ cd my.git
    $ git branch -d -r origin/todo origin/html origin/man (1)
    $ git branch -D test (2)

    1. Delete the remote-tracking branches "todo", "html" and "man". The next fetch or pull will create them again unless you configure them not to.
    See git-fetch(1).
    2. Delete the "test" branch even if the "master" branch (or whichever branch is currently checked out) does not have all commits from the test
    branch.

  • 相关阅读:
    MicroStation VBA 操作提示
    MicroStation VBA 可视化界面
    VBA 操作数字
    MicroStation VBA基础
    C#问题
    C#复习⑨(附带C#参考答案仅限参考)
    C#复习⑧
    C#复习⑦
    C#复习⑥
    C#复习⑤
  • 原文地址:https://www.cnblogs.com/woodyle/p/4859661.html
Copyright © 2011-2022 走看看