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

相关推荐
我家媳妇儿萌哒哒7 小时前
git:无法推送refs到远端。您可以试着运行“拉取”功能,整合您的更改。
git
驯龙高手_追风10 小时前
Gitlab本地服务器搭建及配置-详细教程
git·github
czhc114007566311 小时前
6.11:halcon,Sqlserver;项目sql连接;git
git·sql·sqlserver
炸炸鱼.12 小时前
Git+Jenkins 基本使用:从入门到实战(知识点大全)
运维·git·jenkins
戴国进14 小时前
git stash 用法详解
git
木雷双雄715 小时前
Git 版本回退操作指南
git
m0_579146651 天前
已被 Git 追踪的本地修改文件如何实现临时忽略
git
糖少主1 天前
WSL中使用Beyond Compare 3/4/5作为difftool
git·wsl·beyond compare·difftool
console.log('npc')1 天前
Git版本管控:git reset \+ git push \-f 原理、实操与避坑指南
git
恋喵大鲤鱼1 天前
git reflog
git·git reflog