zoukankan      html  css  js  c++  java
  • 转: git复制到非空目录

    1. 进入非空目录,假设是 /workdir/proj1

    2. git clone --no-checkout https://domain_or_ip/source.git tmp

    3. mv tmp/.git .   #将 tmp 目录下的 .git 目录移到当前目录

    4. rmdir tmp

    5. git reset --hard

    然后就可以进行各种正常操作了。

    github push错误:

    1. git push  
    2. error: The requested URL returned error: 403 Forbidden while accessing https://github.com/wangz/future.git/info/refs  

    git version 1.7.1

    OS:CENTOS

    解决方案:

    vim .Git/config

    修改

     
    1. [remote "origin"]  
    2.     url = https://github.com/wangz/example.git  

    为:

     
    1. [remote "origin"]  
    2.     url = https://wangz@github.com/wangz/example.git  

    再次git push,弹出框输入密码,即可提交

  • 相关阅读:
    第四周
    第二次作业
    jsp
    软件测试第一次
    增删改查
    用户添加
    登录
    购物商城
    jsp第七周作业
    jsp第六周作业
  • 原文地址:https://www.cnblogs.com/wucg/p/6251979.html
Copyright © 2011-2022 走看看