gitattributes

Why are files seen as modified after fresh clone? When is git add --renormalize . used?

こ雲淡風輕ζ 提交于 2020-01-25 05:24:45
问题 I have a problem with files which are seen as modified after a fresh git clone. Usecase in my repo: all text files shall have eol=LF , except *.txt files which shall have eol=CRLF . Here's how .gitattributes looks like: * text=auto *.txt text eol=crlf *.png binary *.jpg binary *.bmp binary Here's my tests: Test 1 new repo with 2 .txt files (LF.txt and CRLF.txt) LF.txt : eol=LF (end of line is LF in the whole file) CRLF.txt : eol=CRLF (end of line is CRLF in the whole file) add, commit, push

Remove Git lfs link to file and add it to git directly

女生的网名这么多〃 提交于 2020-01-25 04:21:12
问题 I need to remove a Git LFS file pointer, and add the file directly to Git. I have a filter in .gitattributes to match certain files: test/**/*.py filter=lfs diff=lfs merge=lfs -text How can I modify it to exclude 1 file from this pattern? I tried something like this: test/**/*.py !test/my_dir/my_file.py filter=lfs diff=lfs merge=lfs -text but it doesn't seem to work... git says that there is no such file 回答1: The .gitattributes file works similarly to the .gitignore file regarding precedence,

Remove Git lfs link to file and add it to git directly

自古美人都是妖i 提交于 2020-01-25 04:21:08
问题 I need to remove a Git LFS file pointer, and add the file directly to Git. I have a filter in .gitattributes to match certain files: test/**/*.py filter=lfs diff=lfs merge=lfs -text How can I modify it to exclude 1 file from this pattern? I tried something like this: test/**/*.py !test/my_dir/my_file.py filter=lfs diff=lfs merge=lfs -text but it doesn't seem to work... git says that there is no such file 回答1: The .gitattributes file works similarly to the .gitignore file regarding precedence,

gitattributes not setting merge driver correctly

时间秒杀一切 提交于 2020-01-22 18:50:31
问题 I have the following directory structure: project/ .git/ ... app/ ... config/ initializers/ braintree.rb environments/ production.rb .gitattributes My project uses two main branches, master and staging, each tracking a different remote (production and staging heroku apps). The idea is that the staging branch moves forward with new features, they get pushed to and tested on the staging remote, then master is fast-forwarded to match staging and pushed to the production remote. Here's what I

What is difference between autocrlf and eol

戏子无情 提交于 2020-01-12 10:48:09
问题 I'm reading git documentation about .gitattributes to fix my problems with mixed line endings and find out that there is two similar settings. AUTOCRLF: End-of-line conversion While Git normally leaves file contents alone, it can be configured to normalize line endings to LF in the repository and, optionally, to convert them to CRLF when files are checked out. If you simply want to have CRLF line endings in your working directory regardless of the repository you are working with, you can set

How can I merge in Git without changing config files in master?

做~自己de王妃 提交于 2019-12-31 03:28:10
问题 We have a number of configuration files that contain information, such as a url, that need to be modified for our developer environment. We create the developer environment as a branch in git, and make the changes to the configuration files. The problem is that when we merge the development branch back to the master branch, it changes the configuration files in the master branch. We would like to store the files in git, so I do not believe we can use .gitignore. We need to keep all of our

How to make server automatically push to Encrypted Git Repository after recieving Unencrypted push

核能气质少年 提交于 2019-12-25 06:49:12
问题 Our company Has a SVN repository for an our software, based off Rails. We've also had a manually updated encrypted repository - pull unencrypted, encode with RubyEncoder, push to encrypted. We've mostly transitioned to Git, and would like to make the process automatic, and I'd like to make the process automatic, and per-commit. So Server recieves a push to unencrypted, any branch Server filters changed .rb files, passing them through Rubyencoder Encrypted .rb files & other files are pushed to

SubGit and .gitattributes

自古美人都是妖i 提交于 2019-12-23 22:26:08
问题 I'm importing an SVN repository into Git, and I have a lot of files with svn:eol-style set. SubGit reads those properties and generates a .gitattributes line for every file. Is there a way to tell it to use a single-liner for every type of file (i.e. *.java text or *.java text eol=lf since we have a style guide rule which mandates that)? I tried to add the info/attributes to the repository just before the import, but there's no change in the generated .gitattributes . Is there a way to do it?

Why changing GitHub repository language not working?

一世执手 提交于 2019-12-23 04:35:36
问题 i have been made a repository in GitHub with as Xcode project with Objective-C language. Beside .gitignore file in root of my project made .gitattributes file and set this code in it: * linguist-vendored *.objective-c linguist-vendored=false But does not show any language in Github homepage. 回答1: The first part of .gitattributes rules must match files in the repository. Unless your Objective-C files have .objective-c for file extension, the above will not work. The following should work: *

What does “check out code” mean in git documentation for line endings?

自闭症网瘾萝莉.ら 提交于 2019-12-22 12:43:08
问题 I'm really confused what "check out code" means in the following page: https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#__code_core_autocrlf_code If you’re on a Windows machine, set it to true – this converts LF endings into CRLF when you check out code: Does it mean when you add files? Because whenever I change core.autocrlf from input to true and vice-versa, the differrence I see in when I add the files (does "check out" mean "add"?): > git config --global core.autocrlf true