zoukankan      html  css  js  c++  java
  • gitt

    一,git config core.autocrlf false

    二,vi .git/config
    [remote "origin"]
    url = https://github.com/iopqrst/learn20140823.git
    [remote "origin"]
    url = https://iopqrst@github.com/iopqrst/learn20140823.git

    三,cat > .gitignore
    #Floder#
    bin/
    node_modules/
    logs/*
    ==========================
    *.a # 忽略所有 .a 结尾的文件
    !lib.a # 但 lib.a 除外
    /TODO # 仅仅忽略项目根目录下的 TODO 文件,不包括 subdir/TODO
    build/ # 忽略 build/ 目录下的所有文件
    doc/*.txt # 会忽略 doc/notes.txt 但不包括 doc/server/arch.txt
    四, git push https://jianyeruan@bitbucket.org/jianyeruan/kd.git +741c3a6^:master
    五,.gitignore只能忽略那些原来没有被track的文件,如果某些文件已经被纳入了版本管理中,则修改.gitignore是无效的。那么解决方法就是先把本地缓存删除(改变成未track状态),然后再提交:
    git rm -r --cached .
    git add .
    六,
    git status
    git add .
    git commit -m 'test'
    git commit --amend
    git reflog 本地 q退出
    git log --oneline 远程
    git fetch --all
    git pull
    git reset --hard xxx
    git branch -a //切换分支
    git checkout -b dev //创建进入dev
    git branch -m devel develop //分支改名
    git merge hotfix //把hotfix 合到当前分支
    git branch -d hotfix //删除分支
    git pull -p //将其从本地版本库中去除
    git rm --cached readme.txt 只从stage中删除,保留物理文件
    git rm readme.txt 不但从stage中删除,同时删除物理文件
    git mv a.txt b.txt 把a.txt改名为b.txt
    git push || git push -f[少用为好把本地版本同步到remove]

    git push origin dev
    git push https://xxxxxxxxxxxxxx

  • 相关阅读:
    HDU 1286(欧拉函数||筛选法)
    因数打表(HDU1215)
    HDU 1003
    T行数据跟着N个数据
    15校赛
    HDU 1002
    简单大数相加
    (质因子打表记录素数的位置)HDU Largest prime factor
    HDU cake
    【转】 cin、cin.get()、cin.getline()、getline()、gets()等函数的用法
  • 原文地址:https://www.cnblogs.com/jayruan/p/6064700.html
Copyright © 2011-2022 走看看