Pensieve
日常记录
日常记录
  • tool

    • yarn
    • powershell
    • 编辑器
    • git命令提示
    • vim
    • gitlab
    • husky-git钩子工具
  • wsl

    • 本机代理
  • html

    • 不常用功能
  • js

    • math 相关
    • js 日期相关
    • API参考
    • 算法相关
    • 图片相关
    • js 事件相关
    • 数据结构相关
    • vue
    • rxjs相关
  • node

    • 文件操作
    • svg压缩工具-svgo
  • go

    • go的一些命令
    • 文件操作
    • 网络相关
    • 目录结构推荐
    • 常用三方库
    • wasm
  • rust

    • Rust 入门笔记
    • wasm
    • 一些库
    • 圣经记录
  • linux

    • hyprland的一些问题
  • 杂项

    • 视频流相关

git命令提示

删除本地、远程分支

git branch -D <分支名>

git push origin --delete <name>

重命名分支

git branch -m <oldName> <newName>

只拉取某个分支

git clone --branch <分支名> --single-branch -- <url>

crlf、lf

git config --global core.autocrlf [true | input | false] # 全局设置

git config --local core.autocrlf [true | input | false] # 针对本项目设置

  • true 提交时转换为LF,检出时转换为CRLF
  • input 提交时转换为LF,检出时不转换
  • false 提交与检出的代码都保持文件原有的换行符不变(不转换)

合并上一次提交

git commit --amend

  • 本地直接合并上一个commit,可连接 -m '提示' 直接更改提示语
  • 远程使用 -f 强制提交也可直接合并,个人分支可用
Last Updated: 9/8/21, 2:54 PM
Contributors: dxy2233
Prev
编辑器
Next
vim