zoukankan      html  css  js  c++  java
  • git

    [root@kunpeng82 mininet]# git branch -vv
    * master bfc42f6 [origin/master] Merge pull request #921 from timgates42/bugfix/typo_updates
    [root@kunpeng82 mininet]# git config --lis
    core.repositoryformatversion=0
    core.filemode=true
    core.bare=false
    core.logallrefupdates=true
    remote.origin.url=https://github.com/mininet/mininet
    remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
    branch.master.remote=origin
    branch.master.merge=refs/heads/master
    [root@kunpeng82 mininet]#
    $ cd mininet
    $ git tag
    1.0.0
    2.0.0
    2.1.0
    2.1.0p1
    2.1.0p2
    2.2.0b0
    2.2.0b1
    2.2.0b2
    2.2.0b3
    cs244-spring-2012-final
    Above, we see the latest available beta release is 2.2.0b3. So, we switch to that branch on our virtual machine.
    
    $ git checkout -b 2.2.0b3
    Switched to a new branch '2.2.0b3'
    root@ubuntu:/data1/root/ryu/sdn-ip/Ryu-SDN-IP# git init
    Reinitialized existing Git repository in /data1/root/ryu/sdn-ip/Ryu-SDN-IP/.git/
    root@ubuntu:/data1/root/ryu/sdn-ip/Ryu-SDN-IP# rm -rf .git
    root@ubuntu:/data1/root/ryu/sdn-ip/Ryu-SDN-IP# git init
    Initialized empty Git repository in /data1/root/ryu/sdn-ip/Ryu-SDN-IP/.git/
    root@ubuntu:/data1/root/ryu/sdn-ip/Ryu-SDN-IP# git commit -m "first commit"



    root@ubuntu:/data1/root/ryu/sdn-ip/Ryu-SDN-IP# git remote add origin https://github.com/magnate3/Ryu-SDN-IP.git
    root@ubuntu:/data1/root/ryu/sdn-ip/Ryu-SDN-IP# git pull --rebase origin master
    fatal: Updating an unborn branch with changes added to the index.
    root@ubuntu:/data1/root/ryu/sdn-ip/Ryu-SDN-IP# git push -u origin master
    error: src refspec master does not match any.
    error: failed to push some refs to 'https://github.com/magnate3/Ryu-SDN-IP.git'
    root@ubuntu:/data1/root/ryu/sdn-ip/Ryu-SDN-IP# git branch 
    root@ubuntu:/data1/root/ryu/sdn-ip/Ryu-SDN-IP# git checkout -b dev
    Switched to a new branch 'dev'
    root@ubuntu:/data1/root/ryu/sdn-ip/Ryu-SDN-IP# git branch
    root@ubuntu:/data1/root/ryu/sdn-ip/Ryu-SDN-IP# git push -u origin master
    error: src refspec master does not match any.
    error: failed to push some refs to 'https://github.com/magnate3/Ryu-SDN-IP.git'
    root@ubuntu:/data1/root/ryu/sdn-ip/Ryu-SDN-IP# git add .
    root@ubuntu:/data1/root/ryu/sdn-ip/Ryu-SDN-IP# git commit -m"xxx"
    [dev (root-commit) 8cc3cee] xxx
     Committer: root <root@ubuntu.ubuntu>
    Your name and email address were configured automatically based
    on your username and hostname. Please check that they are accurate.
    You can suppress this message by setting them explicitly:
    
        git config --global user.name "Your Name"
        git config --global user.email you@example.com
    
    After doing this, you may fix the identity used for this commit with:
    
        git commit --amend --reset-author
    
     18 files changed, 1137 insertions(+)
     create mode 100644 .gitignore
     create mode 100644 LICENSE
     create mode 100644 README.md
     create mode 100644 VERSION
     create mode 100755 bin/sdnip-mgr
     create mode 100644 config.json.bak
     create mode 100644 config.sample.json
     create mode 100644 requirements.txt
     create mode 100644 sdnip/__init__.py
     create mode 100644 sdnip/arp_proxy.py
     create mode 100644 sdnip/conf_mgr.py
     create mode 100644 sdnip/fwd.py
     create mode 100644 sdnip/fwd_bgp.py
     create mode 100644 sdnip/hop_db.py
     create mode 100644 sdnip/sdn_ip.py
     create mode 100644 setup.cfg
     create mode 100644 setup.py
     create mode 100644 static_arp_table.sample.json
    root@ubuntu:/data1/root/ryu/sdn-ip/Ryu-SDN-IP# git pull origin dev
    fatal: Couldn't find remote ref dev
    root@ubuntu:/data1/root/ryu/sdn-ip/Ryu-SDN-IP# git push origin dev
    Username for 'https://github.com': magnate3
    Password for 'https://magnate3@github.com': 
    Counting objects: 21, done.
    Delta compression using up to 64 threads.
    Compressing objects: 100% (17/17), done.
    Writing objects: 100% (21/21), 11.21 KiB | 2.80 MiB/s, done.
    Total 21 (delta 0), reused 0 (delta 0)
    To https://github.com/magnate3/Ryu-SDN-IP.git
     * [new branch]      dev -> dev
    root@ubuntu:/data1/root/ryu/sdn-ip/Ryu-SDN-IP#
    root@ubuntu:/data1/root/ryu/sdn-ip/Ryu-SDN-IP# git add sdn-ip-topology
    root@ubuntu:/data1/root/ryu/sdn-ip/Ryu-SDN-IP# git push origin dev
    Username for 'https://github.com': magnate3
    Password for 'https://magnate3@github.com': 
    Everything up-to-date
    root@ubuntu:/data1/root/ryu/sdn-ip/Ryu-SDN-IP# git diff
    root@ubuntu:/data1/root/ryu/sdn-ip/Ryu-SDN-IP# git status
    On branch dev
    Changes to be committed:
      (use "git reset HEAD <file>..." to unstage)
    
            modified:   README.md
            new file:   sdn-ip-topology/configs/quagga-sdn.conf
            new file:   sdn-ip-topology/configs/quagga1.conf
            new file:   sdn-ip-topology/configs/quagga2.conf
            new file:   sdn-ip-topology/configs/quagga3.conf
            new file:   sdn-ip-topology/configs/quagga4.conf
            new file:   sdn-ip-topology/configs/zebra.conf
            new file:   sdn-ip-topology/quagga-sdn.conf
            new file:   sdn-ip-topology/quagga-test1.py
            new file:   sdn-ip-topology/quagga1.conf
            new file:   sdn-ip-topology/quagga2.conf
            new file:   sdn-ip-topology/quagga3.conf
            new file:   sdn-ip-topology/quagga4.conf
            new file:   sdn-ip-topology/zebra.conf
    
    root@ubuntu:/data1/root/ryu/sdn-ip/Ryu-SDN-IP#
    
    

    之所以引起Everything up-to-date这个信息的原因有:

    1)没有git add;
    2)git add 了,但忘了git commit -m “提交信息”

    root@ubuntu:/data1/root/ryu/sdn-ip/Ryu-SDN-IP# git push origin dev
    Username for 'https://github.com': magnate3
    Password for 'https://magnate3@github.com': 
    Everything up-to-date
    root@ubuntu:/data1/root/ryu/sdn-ip/Ryu-SDN-IP# git add README.md sdn-ip-topology
    root@ubuntu:/data1/root/ryu/sdn-ip/Ryu-SDN-IP# git commit -m"add step of creating topo"
  • 相关阅读:
    《1024伐木累》-小白篇之月侠-总章节五
    《1024伐木累-周末特别篇》-中彩票了,开发APP
    《1024伐木累》-有话直说,蛋疼~
    《1024伐木累》- 老王请客吃晚饭,介绍对象
    《1024伐木累》-小白篇之丽姐(前篇)-总章节四
    程序员最值得听的歌曲TOP10
    《1024伐木累》-职位不分贵贱,没房子怎么乐
    偶是一只别人眼里的程序猿
    《1024伐木累》-写代码写的娘炮了
    《1024伐木累》-小白篇之加班(结束篇)-总章节三
  • 原文地址:https://www.cnblogs.com/dream397/p/13292908.html
Copyright © 2011-2022 走看看