git 提交忽略bin obj等文件

GIT项目提交之前,在跟目录创建.gitignore文件,然后填写以下内容。

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the

然后和项目一起提交到仓库。

如果不是第一次提交代码,可能上面文件不生效,则执行以下代码。

git rm -r --cached .
git add .
git commit -m "update .gitignore"

 

posted @   PrintY  阅读(685)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 零经验选手,Compose 一天开发一款小游戏!
· 通过 API 将Deepseek响应流式内容输出到前端
· AI Agent开发,如何调用三方的API Function,是通过提示词来发起调用的吗
历史上的今天:
2016-04-06 SQL和T-SQL之间的区别
2016-04-06 存储过程优化
点击右上角即可分享
微信分享提示