zoukankan      html  css  js  c++  java
  • gitlab使用

    You won't be able to pull or push project code via SSH until you add an SSH key to your profile

    解决方式(只针对linux用户,windows用户请自查):http://blog.csdn.net/hustpzb/article/details/8230454/

    切换版本+拉取最新数据+本地提交+远程提交

    [plain] view plain copy
     
     print?
    1. git checkout f-fixonlinetimebug  
    2. git merge dev  
    3. git add filename  
    4. git commit filename -m "xxxxxx"  
    5. git push origin f-fixonlinetimebug  
    6. git push origin f-appupdate  


    查看所有branch版本

    [plain] view plain copy
     
     print?
    1. git branch -a  


    //切换到dev合并代码,提测完毕后才能执行

    [plain] view plain copy
     
     print?
    1. git checkout dev  
    2. git merge f-fixonlinetimebug  
    3. git push origin dev  


    //查看配置信息

    [plain] view plain copy
     
     print?
    1. git config --list  


    //创建远程分支(test在远程本来是没有的,只是因为我push一下才有的)

    [plain] view plain copy
     
     print?
    1. git push origin test  


    //fatal: cannot do a partial commit during a merge.

    [plain] view plain copy
     
     print?
    1. git commit -i [冲突文件]  


    git恢复本地修改文件(相当于svn revert filename)

    [plain] view plain copy
     
     print?
    1. git checkout index.php  
    2. 如果已经放到暂存里面了  
    3. git reset HEAD -- index.php  
    4. 如果已经放到HEAD里面了(注意这里面有坑,不小心会把数据搞没有的)  
    5. git log 查看log版本号  
    6. git reset --hard 1d8074beb15a2e074c9b565c4c94bc2a97567b94  
    7. git reset --hard  
    8. git pull  

    git切换到远程分支?

    [plain] view plain copy
     
     print?
    1. git checkout -b niuyufu  


    git删除分支

    [plain] view plain copy
     
     print?
    1. git branch -d niuyufu  


    [Git] Fatal: cannot do a partial commit during a merge

    解决方法是
    1. 提交全部
    git commit -a 
    2. 如果不想提交全部,那么可以通过添加 -i 选项
    git commit file/to/path -i -m "merge"
    上述情况一般出现在解决本地working copy冲突时出现, 本地文件修改(手工merge)完成后,要添加并提交,使得本地版本处于clean的状态.

  • 相关阅读:
    ⑥nginx location
    ③nginx 多虚拟主机配置
    ①nginx 安装简介
    11.ansible 角色
    10.ansible 标签功能 触发功能 忽略远程主机采集
    9.ansible 循环功能和忽略错误
    8.ansible 判断功能
    7.ansible在剧本中注册信息
    6.ansible变量
    5.ansible 剧本编写规范
  • 原文地址:https://www.cnblogs.com/tonjocelyn/p/5227680.html
Copyright © 2011-2022 走看看