I'm making a game for a Gr. 12 programming course with my friends. I have 3D models I made in Blender on my local repository. Blender files end in .blend, and it also likes to make backups with extensions such as something.blend1, something.blend2, and so on, and I don't like deleting them every time I work on them. I'd like to ignore those in my .gitignore, how would I do that?
I tried having *.blend* in my .gitignore, but that ignored everything that ended in .blend. I also tried .blend*, but that ignored nothing.
Try this instead: *.blend?
The * matches zero or more characters, but the ? matches a single character.
Related
I have an annoying problem and can't seem to figure out what's causing it. On my machine when I try to use Update Model from Database... on Edmx file in EF Database first approach the autogenerated model has blank lines between properties. This doesn't seem to occure on other developers machines even though we have same versions of VS , extensions etc.
Problem is that even when I add for example one new table the refresh automatically adds blank lines for all mapped tables. Later all of this is visible as conflict during merge operations in GIT.
Would really appreciate any help since I did't find a single shred of information on this issue anywhere and this really disrupts work.
I checked the files (Model.tt on my machine and my friends) using Notepad++ comparer and it said there are no differences but the encoding is different. When I copied Model.tt manually and did the update the blank lines were gone.... Must be some kind of quirk.
Posting as an answer since I wasted few hours on this and someone might have simmilar problem.
What worked for me
💡Turns out it was how my OS was ending lines
Working in Windows. Earlier disabled "auto carriage returns (CR) + line feeds (LF) line endings" in global Git configuration, reenabled:
git config --global core.autocrlf true
FYI 'nix/Mac ends lines w/ LFs only, Windows end lines w/ CRs + LFs
Opened up *DataModel.tt and *DataModel.Context.tt in Notepad++
Edit > EOL Conversions > Windows (CR LF) > Save
Refresh EDMX
Looking for a better terminal-based solution, sounds like dos2unix will come in to play at some point. Will amend this as soon as I've ironed this out.
I'm trying to copy several files with changing filenames. It seems very easy but I can't seem to work out how to do it without actually listing out the filenames in their entirety. The first few letters of the filenames correspond to the subject names which I'm looping through one by one. In each folder, there are 2 files, one is something like this subj1_load1_vs_load2.img, one is subj1_load1_vs_load2.hdr. I want both of them copied. Below is what I have:
subj={'subj1','subj2','subj3','subj4','subj5'}
for i=1:length(subj)
source=fullfile(filedir,subj{i},sprintf('^%s_.*\.*',subj{i})); % this doesn't seem to work
destination=fullfile(destdir,subj{i});
copyfile(source,destination);
end
I've also tried:
source=dir([filedir subj{i} strcat(subj{i},'*')]);
This appears to needlessly complicate since I will need to deal with .name. But perhaps I don't know how to use this well.
Anyway, the problem is with source as I'm trying to find the files i want to copy.
I'd appreciate any suggestions.
Below is Daniel's answer (which solved the issue for me)
source=fullfile(filedir,subj{i},strcat(subj{i},'*'))
I have a file that was forked from a project at an unknown moment in the past. I want to identify as closely as possible the moment of that fork. The file has been changed since the fork-moment.
Winmerge highlights about about 20% of the lines, with about half of those being just a few characters within the line, a path change or inline function turned into a variable or function call for instance. (20% after ignoring whitespace change and enabling moved-block detection that is, closer to ~40% without that.)
I don't have to worry about branches, the original version control system was CVS. (I don't have access to the CVS file system). I have a git imported version with tags corresponding to the CVS commits, and could generate the same with Mercurial for little effort if need be.
I don't care about matching the specific CSV commit date/time/number/whatever. The goal is to identify when the content of new file started drifting, and step forward through the revision history, cherry picking what to merge to the forked file.
For this project I could brute force it, there only a dozen or so revisions where the fork has mostly likely occurred and the file is less than 500 lines. However it's not hard to imagine a scenario where this is not feasible and I'm curious about what an elegant solution might be.
How would you go about solving this?
"Brute force" sounds as if you were contemplating testing all revisions. Normally one would use a binary search. To decide if it was a good match, I'd normally use just the numbers from diffstat (since you say there are post-fork changes). Accounting for block-moves complicates things, though.
So, at my job we have grunt.js running to compile all of our js into a single file. This is great little feature of grunt.js (with grunt:requirejs/growl) BUT its causing a problem. PyCharm will frequently freeze for 3 - 10 seconds.
If i disable grunt then the freezing wont happen (since there is no 65 KLOC js file). The files that are combined are being parsed (is what i have narrowed it down to) for autocomplete. How would i remove a single file? I could, potentially create a folder for the combined file, but i really do not want too...
Edit: Better engrish...
Not "remove" a single file, but "exclude" a single file (sorry, brain.speed > finger.speed)
So the answer, the obvious one, is that the file system, with grunts, need to have the automagic combined files in their own directory. Then that directory can be excluded. (Right click, toward the bottom).
Since i did that, my pycharm has yet to freeze.
I have used mercurial for some time now and never had any problems using hgignore.
Now I have created a new project using eclipse, which added a .metadata directory.
I seem to be unable to ignore the .metadata.
nils#yavin $ hg status
? .metadata/.mylyn/repositories.xml.zip
? .metadata/.plugins/org.eclipse.core.resources/.history/37/509db4063df7001f14dbbfe704ff2c4e
...
My .hgignore looks like this:
syntax: regexp
/\.metadata/.*
\.metadata/.*
glob:.metadata/*
glob:.metadata/.mylyn/repositories.xml.zip
As you can see, I tried some things... I even tried adding one file directly, but it did not work.
Is there any magic involved when dealing with dot-directories? Or am I simply stupid today?
Just remove everything and leave:
glob:.metadata/*
The first line syntax:regexp in your .hgignore is making hg treat all subsequent lines as regex, including the one with glob:.metadata/*