git命令

配置公钥后的常用步骤,建议在要上传的文件中右键打开git

  1. 全局配置
  2. git init :初始化
  3. git add . :上传缓存区
  4. git commit - m "random" :添加说明
  5. git remote rm origin :切断原来链接
  6. git remote add origin +SSH地址或着http地址 :与远程仓库建立连接
  7. git push origin master

git push -f origin master :强制推送

设置为 Windows 风格的换行符

git config --global core.autocrlf true

设置为 Unix 风格的换行符

git config --global core.autocrlf input

相关推荐
言之。5 小时前
Git Hooks
git
代码AI弗森6 小时前
Git Bash 与 PowerShell:定位差异、使用场景与选择建议
开发语言·git·bash
森叶8 小时前
Git flow command error: ‘flow‘ is not a git command 问题解决
git
天麓9 小时前
git merge 举例
git
AI_567810 小时前
Git冲突治理白皮书:智能标记与可视化协同的下一代解决方案
大数据·人工智能·git·机器学习
念丶小宇10 小时前
Git常用指令
大数据·git·elasticsearch
CSDN_RTKLIB11 小时前
Git Clone
git
中二病码农不会遇见C++学姐11 小时前
.env 文件是干啥的?为什么不能提交到 Git?
git·学习
CoderJia程序员甲12 小时前
GitHub 热榜项目 - 日榜(2026-02-03)
git·ai·开源·llm·github
宴之敖者、12 小时前
Linux——git和gdb
linux·运维·git