zoukankan      html  css  js  c++  java
  • 【git】学习路径失败了

    期初规划:搭建git远程服务器  使用gitlab作为管理工具

    过程遇到的问题

    1.gitlab不能安装到win ,且对centos要求6以上,我只有一台centos5  让运维帮升级 。。。等待。。后来想到云主机时 已经很晚了,并且我已经开始尝试mac上搭建了。。linux上暂时搁置了

    2.即使有一台centos6+ ,感觉安装gitlab 未必就顺利了,rpm安装遇到各种问题,包括配置文件的问题,难度系数5颗星(不好解决)

    3.考虑到gitlab 不好装,没有mac版,那就先装一个远程git, 在mac上尝试也是各种坑,按照教程来也会有很多不明白的配置内容,ssh服务如何搭建,搭建好了如何测试等等都是坑...

    4.mac上算是搞出来一个服务端环境吧,但是掌握的很浅,并不能灵活运用, win上的gitbash居然报错“ssh git@192.168.1.104; bad adress” 在mac上是好用的,百了很久也没解决..想着周一到公司找台好用的机器试试..

    5.遇到这么多问题忽然想起来其实我把远端库操作熟练掌握了 基本上就达到目的了,至于建远端库其实可以后续再做

    6.干,直接github上来试,发现证书要求输密码,我竟然不知道是要让我输哪一个密码,后来发现https方式访问可以用github账户

    7.再后来远端操作成功了 

    localhost:~ robin$ git clone https://github.com/****online/oxgren.git
    Cloning into 'oxgren'...
    remote: Counting objects: 104, done.
    remote: Total 104 (delta 0), reused 0 (delta 0), pack-reused 104
    Receiving objects: 100% (104/104), 149.05 KiB | 30.00 KiB/s, done.
    Resolving deltas: 100% (14/14), done.
    Checking connectivity... done.
    localhost:~ robin$ ls
    Desktop		Downloads	Movies		Pictures	oxgren
    Documents	Library		Music		Public
    localhost:~ robin$ cd oxgren/
    localhost:oxgren robin$ git pull
    Already up-to-date.
    localhost:oxgren robin$ git push
    warning: push.default is unset; its implicit value has changed in
    Git 2.0 from 'matching' to 'simple'. To squelch this message
    and maintain the traditional behavior, use:
    
      git config --global push.default matching
    
    To squelch this message and adopt the new behavior now, use:
    
      git config --global push.default simple
    
    When push.default is set to 'matching', git will push local branches
    to the remote branches that already exist with the same name.
    
    Since Git 2.0, Git defaults to the more conservative 'simple'
    behavior, which only pushes the current branch to the corresponding
    remote branch that 'git pull' uses to update the current branch.
    
    See 'git help config' and search for 'push.default' for further information.
    (the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
    'current' instead of 'simple' if you sometimes use older versions of Git)
    
    Username for 'https://github.com': online@qq.com
    Password for 'https://online@qq.com@github.com': 
    Everything up-to-date
    localhost:oxgren robin$ touch reamde1.txt
    localhost:oxgren robin$ open reamde1.txt 
    localhost:oxgren robin$ git add reamde1.txt 
    localhost:oxgren robin$ git status
    On branch master
    Your branch is up-to-date with 'origin/master'.
    Changes to be committed:
      (use "git reset HEAD <file>..." to unstage)
    
    	new file:   reamde1.txt
    
    localhost:oxgren robin$ git commit -m"test add readme.txt"
    [master ad8eec6] test add readme.txt
     1 file changed, 1 insertion(+)
     create mode 100644 reamde1.txt
    localhost:oxgren robin$ git status
    On branch master
    Your branch is ahead of 'origin/master' by 1 commit.
      (use "git push" to publish your local commits)
    nothing to commit, working directory clean
    localhost:oxgren robin$ git push
    warning: push.default is unset; its implicit value has changed in
    Git 2.0 from 'matching' to 'simple'. To squelch this message
    and maintain the traditional behavior, use:
    
      git config --global push.default matching
    
    To squelch this message and adopt the new behavior now, use:
    
      git config --global push.default simple
    
    When push.default is set to 'matching', git will push local branches
    to the remote branches that already exist with the same name.
    
    Since Git 2.0, Git defaults to the more conservative 'simple'
    behavior, which only pushes the current branch to the corresponding
    remote branch that 'git pull' uses to update the current branch.
    
    See 'git help config' and search for 'push.default' for further information.
    (the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
    'current' instead of 'simple' if you sometimes use older versions of Git)
    
    Counting objects: 3, done.
    Delta compression using up to 8 threads.
    Compressing objects: 100% (2/2), done.
    Writing objects: 100% (3/3), 279 bytes | 0 bytes/s, done.
    Total 3 (delta 1), reused 0 (delta 0)
    To https://github.com/online/oxgren.git
       7b83831..ad8eec6  master -> master
    localhost:oxgren robin$ 

    8.再练习三遍 暂时先这么玩着吧,毕竟花了2天的时间来搞了, 上班先搞个gitlab的private库用着吧  有时间再搭建吧

    9.好吧 算我傻逼 居然没看到这篇文章  http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/00137583770360579bc4b458f044ce7afed3df579123eca000

    10.不断的使用linux命令和习惯linx思维,不断的尝试英文阅读理解 ,才能掌握更多的知识,基础很重要,就像要看懂资本论 逻辑学 你就要先理解好大量的系统词语。

  • 相关阅读:
    第二册二十一课
    第二册第二十课
    第二册第十九课
    第二册第十八课
    あなたがいるから (因为有你)
    flash 概要分析器
    this与回调函数
    cpp可变参笔记
    struct详解
    函数传递小结
  • 原文地址:https://www.cnblogs.com/viewcozy/p/4821965.html
Copyright © 2011-2022 走看看