How to handle IDE project files with git-svn

南笙酒味 提交于 2019-12-10 22:19:30

问题


I'm using git-svn and there are IDE project files in the svn repository. Everytime I start my IDE it modifies project files a bit and they are marked as changed in the status display. And then if I try to do a git svn rebase to update my working tree to have the latest changes from the svn it fails as I have local modifications on the project files and I have to stash the changes. How can I ease my workflow so I wouldn't have to stash/stash apply everytime I haven't really modified anything?


回答1:


Create a simple git alias which does what you want (untested):

[alias]
   safe-svn-rebase = "git stash 'preparing to rebase'; git svn rebase; git stash pop"



回答2:


Which IDE are you using? For instance with Visual Studio, there are .suo, and .csproj.user files that can be ignored by source control without causing you any headaches. The .csproj file will mainly change when you add or remove items so this should be ok.




回答3:


There are certain files it's probably a good idea not to add to source control. This is user specific stuff, and also quite often solution files. Project files are ok.



来源:https://stackoverflow.com/questions/974371/how-to-handle-ide-project-files-with-git-svn

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!