zoukankan      html  css  js  c++  java
  • git常用命令

    下载私有项目 git clone https://username:password@github.com/xxx/xxx.git /var/www/xxx

    创建分支 git branch test

    将分支提交到远程 git push origin test:test

    查看远程分支 git branch -r

    查看各分支的最后一次提交 git branch -v

    切换分支 git chekout 分支名

    提交代码到分支 git push origin test

    整个文件夹提交 git add /var/www/git/

    长期保存密码: git config --global credential.helper store  //执行这个命令后,第一次提交需要输入用户名密码,以后就不需要了

    设置记住密码:git config --global credential.helper cache //默认15分钟

    设置记住密码时间:git config --global credential.helper 'cache --timeout=3600' //设置一个小时内有效

    删除文件:git rm -f 文件; git commit; git push;

  • 相关阅读:
    ref和out的区别
    final、finally、finalize的区别
    get和post的区别
    什么是事务
    锁的详细
    什么是游标
    什么是存储过程
    委托的来由
    多线程的秘密
    String str=null; 和String str=""的区别
  • 原文地址:https://www.cnblogs.com/xiaozong/p/5566085.html
Copyright © 2011-2022 走看看