FAQ Database Discussion Community


How to completly turn off git line endings auto correction

git,git-svn,gitattributes
I'm writing a script that migrates our SVN repos to GIT. I have discovered that one repo contains a .gitattributes file (with content like * type=text). That unfortunately means that all files are modified (line endings are auto corrected). I don't want that because as a next step we are...

git add file to archive

git,github,gitignore,gitattributes
When I run this command, the files of my latest commit are saved to a ZIP. git archive -o ../code_version0.9.zip HEAD However the files in node_modules and build/ are missing. That Is because my .gitignore is the following one: node_modules build/ How can I ignore files, but Include them In...

Where do custom git merge drivers get stored?

git,git-merge,gitattributes
I was reading this blog post, since I needed a custom git driver to merge a few json files in my git repo. The instructions on the script mention editing .git/config to add the merge and also editing the git attributes in .gitattributes but do not mention where to place...

What is the difference between diff and diff=astextplain?

git,gitattributes
Can someone help me. I am using Git (GitHub) and trying to decide what to set my *.sql files to in the gitattributes. I've seen people use *.sql diff=astextplain *.sql diff *.sql text=auto I was advised to set this to the second option, but I am just wondering what is...

How to tell git-svn that files are NOT binary

git,svn,migration,git-svn,gitattributes
I am converting a large SVN-repo (~28k Commits) into Git using git-svn. When the process was through (~ 1 1/2 weeks) I encountered some .ps1-files being treated as binary in the diffs. I have commited a .gitignore file on master (after the conversion of course) that tells git to treat...

Override .gitattributes text=auto in Windows

windows,git,gitattributes,core.autocrlf
This is pretty unintuitive: C:\python-tdl\examples\termbox>git config core.autocrlf false C:\python-tdl\examples\termbox>git commit termbox.py warning: LF will be replaced by CRLF in examples/termbox/termbox.py. The file will have its original line endings in your working directory. warning: LF will be replaced by CRLF in examples/termbox/termbox.py. The file will have its original line endings in...

Ignore line of code in Git

git,gitignore,gitattributes
In my project I would like to ignore a single line of code, because it contains a directory which is different for every user of the repo. I have found a useful answer for my problem, however I don't know how to apply this to my own problem. The line...

At what point will .gitattribute eol settings be run?

git,line-endings,git-config,gitattributes
After adding a line to a .gitattributes file in the root of a repository: *.tt eol=crlf At what point will what process apply this rule and change the line endings; at merge or at commit or at push? Where will it run them on the client or whatever is storing...

Force LF eol in git repo on all platforms with .gitattributes

git,eol,gitattributes
I have a remote repo that is being cloned and worked on in boths windows and mac. I want whenever anyone pulls this repo, it should automatically use LF eol on any platform. My main issue occurs whenever the Windows Build Server pulls the repo. I don't have control over...