Search Results

Search found 8 results on 1 pages for 'gitattributes'.

Page 1/1 | 1 

  • How to determine files that are subjected to filter via gitattributes when filter is executed?

    - by rasjani
    I have bunch of ruby scripts in a git repository and it seems to be really hard to enforce people to write properly indented code. I also have a small ruby script that formats to code to specific standard and now i would like to run that as a a filter script so that junk wont get committed into repository. echo "*.rb filter=rubyfilter" > .gitattributes echo "[filter \"rubyfilter\"]" >> .git/config echo " clean = /home/rasjani/bin/rbeauty" >> .git/config echo " smudge = /home/rasjani/bin/rbeauty" >> .git/config does the dirty trick git side but the ruby script should then process the files affected: how / where do i look those up from ?

    Read the article

  • Is it possible to have all "git diff" commands use the "Python diff", in all git projects?

    - by EOL
    When including the line *.py diff=python in a local .gitattributes file, git diff produces nice labels for the different diff hunks of Python files (with the name of the function where the lines changed take place, etc.). Is is possible to ask git to use this diff mode for all Python files across all git projects? I tried to set a global ~/.gitattributes, but it is not used by local git repositories. Is there a more convenient method than initializing each new git project with a ln -s ~/.gitattributes?

    Read the article

  • Should I merge .pbxproj files with git using merge=union?

    - by Ortwin Gentz
    I'm wondering whether the merge=union option in .gitattributes makes sense for .pbxproj files. The manpage states for this option: Run 3-way file level merge for text files, but take lines from both versions, instead of leaving conflict markers. This tends to leave the added lines in the resulting file in random order and the user should verify the result. Normally, this should be fine for the 90% case of adding files to the project. Does anybody have experience with this?

    Read the article

  • Configure Git to use Beyond Compare for image diff

    - by Barney
    Because we work with a number of sprites, the kind of specialised diff views provided by Beyond Compare would be ideal to see which one of 2 versions I'm after when conflicts arise. I've already configured Git to use Beyond Compare as my primary diff and merge tool as described in their integration guide — it specifically goes into how to configure TortoiseSVN to use it for images, and I've found these articles talking about .gitattributes in general and how to script interactions from a *nix shell — but it's not obvious to me how I can use the advice provided by these guides to make a simple change that would say "use the default diff & merge bindings for files determined to be images, too". For the record, I'm doing all this on Windows :P

    Read the article

  • LVDiff not working in Git

    - by Tanner
    I'm trying to get lvdiff from meta-diff suite to work with Git. My .gitconfig looks like this: [gui] recentrepo = C:/Users/Tanner/Desktop/FIRST 2010 Beta/Java/LoganRover [user] name = Tanner Smith email = [email protected] [merge "labview"] name = LabVIEW 3-Way Merge driver = 'C:/Program Files/National Instruments/Shared/LabVIEW Merge/LVMerge.exe' 'C:/Program Files/National Instruments/LabVIEW 8.6/LabVIEW.exe' %O %B %A %A recursive = binary [diff "lvdiff"] #command = 'C:/Program Files/meta-diff suite/lvdiff.exe' external = C:/Users/Tanner/Desktop/FIRST 2010 Beta/lvdiff.sh [core] autocrlf = true lvdiff.sh looks like this: #!/bin/sh "C:/Program Files/meta-diff suite/lvdiff.exe" "$2" "%5" | cat And my .gitattributes file looks like this: #Use a cusstom driver to merge LabVIEW files *.vi merge=labview #Use lvdiff as the externel diff program for LabVIEW files *.vi diff=lvdiff But everytime I do a diff, all Git returns is: diff --git a/Build DashBoard Data.vi b/Build DashBoard Data.vi index fd50547..662237f 100644 Binary files a/Build DashBoard Data.vi and b/Build DeashBoard Data.vi differ It is like it is not using it or even recognizing my changes. Any ideas?

    Read the article

  • git status: how to ignore some changes

    - by Mr Fooz
    Is there a way to have git status ignore certain changes within a file? Background I have some files in my repository that are auto-generated (yes, I know that's typically not recommended, but I have no power to change this). Whenever I build my tree, these auto-generated files have status information updated in them (who generated them, a timestamp, etc.). When I say git status, I'd like it to run a filter on these generated files that strips out this transient status information. I only want it to show up in the "Changed but not updated:" section of git's output if there are other, real changes. Using the .gitattributes approach found at http://progit.org/book/ch7-2.html, I am able to get git diff to ignore these status line changes using a simple egrep filter. I'd like to get git status to also use textconv filters (or something equivalent). I'd prefer it if merges aren't affected by any of this filtering.

    Read the article

  • xcodeproj merge fails when adding new group

    - by user1473113
    I'm currently using Xcode with Git, and I'm experiencing some troubles during the merge process of my xcodeproj. Developer1 create a new group in Xcode file arborescence the commit and push. Developer2 on an other computer do the same with an other group name, commit and pull(with merge). The xcodeproj of Developer 2 become unreadable with Xcode. But when I create a new file or just drag and drop files from finder to repository, the merge succeed. Did someone has experienced that kind of trouble? I'm using in .gitattributes: *.pbxproj -crlf -diff merge=union # Better to treat them as binary files. *.pbxuser -crlf -diff -merge *.xib -crlf -diff -merge and in my .gitignore # Mac OS X *.DS_Store *~ # Xcode *.mode1v3 *.mode2v3 *.perspectivev3 *.xcuserstate project.xcworkspace/ xcuserdata/ *.xcodeproj/* !*.xcodeproj/project.pbxproj !*.xcodeproj/*.pbxuser # Generated files *.o *.pyc *.hi #Python modules MANIFEST dist/ build/ # Backup files *~.nib \#*# .#*

    Read the article

  • Why should I use core.autocrlf in Git

    - by Rich
    I have a Git repository that is accessed from both Windows and OS X, and that I know already contains some files with CRLF line-endings. As far as I can tell, there are two ways to deal with this: Set core.autocrlf to false everywhere, Follow the instructions here (echoed on GitHub's help pages) to convert the repository to contain only LF line-endings, and thereafter set core.autocrlf to true on Windows and input on OS X. The problem with doing this is that if I have any binary files in the repository that: a). are not correctly marked as binary in gitattributes, and b). happen to contain both CRLFs and LFs, they will be corrupted. It is possible my repository contains such files. So why shouldn't I just turn off Git's line-ending conversion? There are a lot of vague warnings on the web about having core.autocrlf switched off causing problems, but very few specific ones; the only that I've found so far are that kdiff3 cannot handle CRLF endings (not a problem for me), and that some text editors have line-ending issues (also not a problem for me). The repository is internal to my company, and so I don't need to worry about sharing it with people with different autocrlf settings or line-ending requirements. Are there any other problems with just leaving line-endings as-is that I am unaware of?

    Read the article

1