Questions tagged [gitattributes]

Git attributes provide the option to set various settings for a set of files/directories.

Git attributes provide the option to set various settings for a set of files/directories, including the option to do it recursively within a path (for all of its children files and directories). Such settings can be: merge strategies, how to identify and diff binary files, how to export repositories, SVN or CVS-style keyword expansion.

268 questions
0
votes
1 answer

Sha256 hash of a zip file is different after git commit despite archive contents not changing?

I'm using git archive to export source code from a certain project folder src in a repository in order to calculate its combined sha256 hash like so: git archive HEAD --worktree-attributes -o project-archive.zip src/ sha256sum project-archive.zip |…
0
votes
1 answer

How can core.autocrlf be still set if it is not set in local/global/system level?

On windows (git version 2.14.1.windows.1) all the following do not print anything: git config --global core.autocrlf git config --system core.autocrlf git config --local core.autocrlf but the following prints true git config core.autocrlf How…
Marinos An
  • 9,481
  • 6
  • 63
  • 96
0
votes
1 answer

Why is this clean filter being ignored the first time it runs?

In an attempt to automatically make .sh files executable on commit, I made a clean filter and was confused by its results. First, I ran git config filter.executable.clean 'chmod +x %f'. This adds the following stanza to my test repository's…
ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257
0
votes
2 answers

Why changing GitHub repository language not working?

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…
reza_khalafi
  • 6,230
  • 7
  • 56
  • 82
0
votes
2 answers

Git Merge (merge from one branch to another)

I have two branch lets say one branch is branch_one and second one is branch_two. Now both branches have been used paralleled for different set of developments. Now, I want to merge some commits from branch_two to branch_one, but based on start of…
0
votes
1 answer

Git checkout when using submodules

I have a parent git repo with 3 branches in it. I am also using a submodule repo, that has the 3 branches with the same names, and the .gitattributes file in each branch of the parent repo points to the submodules branch of the same name. This is…
0
votes
1 answer

git diff-filter reports unchanged smudge/cleaned files

for a repo with smudge/clean filters, a diff command like so git diff master --name-only --diff-filter=ACMR keeps reporting all my (unchanged) smudged files.
ThorSummoner
  • 16,657
  • 15
  • 135
  • 147
0
votes
1 answer

Git Cross-platform line endings

I share a git repository with many people and we are currently finding it difficult to get the desired line ending function. What we would like to happen: All files on the repository are stored with LF line endings When a Mac user…
WhS4
  • 83
  • 1
  • 1
  • 7
0
votes
0 answers

Git ignores autocrlf config flag

I'm trying to contribute to a git project whose source files have CRLF line endings. When cloning the project, git immediately marks all the source files as modified. My config is: $ git config…
digory doo
  • 1,978
  • 2
  • 23
  • 37
0
votes
1 answer

Which diff formats are supported by Git?

In .gitattributes I see things like: *.htm text diff=html *.html text diff=html *.java text diff=java ... diff=astextplain How are those called, diff formats, diff outputs ? Where is the list of all…
Christophe Roussy
  • 16,299
  • 4
  • 85
  • 85
0
votes
1 answer

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

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…
0
votes
1 answer

.gitattributes file - prevent file from being merged but still view diff

I'm dealing with some really awkward XML files that I want to prevent being merged. I know that I can do this using the -diff marker in .gitattributes. However I would still like to be able to read the diff in gitk if possible. Is there an easy way…
Neil P
  • 2,920
  • 5
  • 33
  • 64
0
votes
1 answer

Git/Veracrypt EOL hell - cannot discard modified files

Does veracrypt do any sort of file caching in memory that might be preventing changes to my git config files to be recognized? Long version: I have a repo on a veracrypt partition shared with Windows. While trying to enforce EOL's in my repo, I am…
FrozenKiwi
  • 1,362
  • 13
  • 26
0
votes
1 answer

git add file to archive

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…
John Smith
  • 6,105
  • 16
  • 58
  • 109
0
votes
1 answer

How to completly turn off git line endings auto correction

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…
Pesha
  • 87
  • 4
1 2 3
17
18