TortoiseGit
No supported authentication methods available (server sent:publickey)
需要修改 TortoiseGit 网络的 SSH 客户端为 git 服务器的 ssh.exe
could not read form remote repository
原因:
- 权限不够
Commit整合
若提交1~6的内容类似有重复,可以将2~6撤销,重新提交到“提交1”。
- 在Show log中选择 “提交1”版本;
- Reset Type选择Soft,保留当前修改;
- Git Commit -> master,提交到“提交1”版本;
- 再次查看日志,已去掉重复提交;
Push整合
force push功能,需要当前分支未受保护(unprotected)。
否则强制推送会出错:You are not allowed to force push code to a protected branch on this project
若推送1~6的内容类似有重复,可以将2~6撤销,force push重新推送。
1.2.3.步骤可以参考Commit整合,操作类似。
- Push,Options中选择force;
- 再次查看日志,已去掉重复推送;
新建空分支
- 在主目录下右键点击“Git Bash Here”;
- 新建一个空白分支;
git checkout --orphan <new_branch>
git rm -rf .
- 提交一个新文件.gitignore;
echo > .gitignore
git add .gitignore
- 提交并推送
git commit -m "Initial"
git push origin branch1
新分支branch1创建成功,可以编辑下次提交时需要过滤的文件类型。
可以选择一个模板,比如VisualStudio,在此基础上可以继续添加其他过滤规则。
GitLab 新建仓库
-
新建空白项目
-
添加 .gitignore
根据使用语言,选定模板
然后在后面添加额外的忽略规则。例如
# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp
# JetBrains Rider
*.sln.iml
# else
.svn
*.o
*.lo
*.la
*.al
.libs
*.so
*.so.[0-9]*
*.a
*.pyc
*.pyo
__pycache__
*.rej
*~
\#*\#
.\#*
.*.swp
.DS_Store
[Tt]humbs.db
obj/
bin/
Output/
*.licx
- 本地管理
clone到本地,现在可以commit、push了。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
2021-07-01 LINQ 关联数据