How can I exclude the .sass-cache folder from my SVN repository? - compass-sass

I am a compass sass beginer.
I don't want to upload this folder to svn, it is not useful at all. how to set compass to move it to other place?

The directory is already in the best place, i.e. with the rest of your Compass files, so it's probably a better idea to just tell SVN to ignore it. It's a long time since I've used SVN but here's a good write up on the svn:ignore property.

Related

Source ~/.vim directory from another location than home directory

To install ~/.vimrc on a system-wide level, I execute vim --version and look where I can put it.
But what steps do I have to take in order to change the location of the /.vim directory containing e.g. autoload with pathogen, plugins, etc.? The more I think about it, the less I understand why it is sourced at startup anyhow.
take a look the /etc/vimrc and /usr/share/vim or /usr/share/vim74 But it is not good to change those files. Because next time you upgrade vim, those files could be overwritten by your package manager, unless you do this manually or never update vim.
edit
Just noticed that the question was tagged with osx.... the above text is based on linux. If it doesn't help, I am gonna remove it.

Making small changes to scss files via FTP without having to re-upload all files

Please don't shoot me if this is a stupid question. My sass workflow looks like this. I navigate to the directory I'm working in and use the command sass --watch . to get it to watch the current directory. Then I usually separate my files into partials and import them into a main file. Once I'm happy with the changes I upload everything to the server.
Now however, I find myself in a situation where I want to make a quick visual change to something on my live site. Normally in CSS I would just download the style.css file make the change and re-upload it. The only way I could see this working in SASS is downloading all my scss files, typing in the sass --watch . command again, making that small change and then re-uploading everything via FTP.
Is this the only way? Is there an easier solution?
Are you just using sass to generate a css file in the command line? If so, you don't even really need to upload the sass files to your server. You can just upload the css file that sass --watch generates.
If you do want the sass files on your server though, you only need to upload the changed sass file(s) and any updated css file(s) that is generated.
If your main file imports _a.sass, _b.sass, and _c.sass and you only make changes to _b.sass, you would only need to upload _b.sass and the css that is generated, but make sure you have fresh copies of _a.sass and _c.sass locally before you make edits.

Undo a git clean command?

I just used a "git clean" command and managed to delete my Documents, Music, and other directories. Is there a way to undo this and somehow get those files back? I did this via Terminal on Mac. Time Machine isn't setup either.
I'm afraid those files are gone. git clean is not reversible since those files were not tracked by git.
From the comments it looks like you had your home folder as git repo, but with nothing tracked.
Running git clean -f removed any file inside the home folder (included the one in the subdirectories), leaving only empty subdirectories (the -d option is required for removing them too).
I'm sorry to inform you that you definitely wiped out your whole home directory. Next time you run a git clean use the -n options to perform a dry run and check what's going to happen before it's too late.
Unfortunately git clean removes all the untracked files, meaning the files that are deleted are not able to be recovered using git. You might be able to check your trash to see if the files still exist there.

How to restore version control in XCode?

I have just recently backed-up my XCode C++ project on my pendrive, using
rsync -avu
Since then, the version control for my project is grayed-out on every files, I can modify the files and not see the "M" nor the "A" sign. The only files still having version-control working "shared" files for which it works correctly. (Those shared files belong to a different project called "Shared").
I have tried git commit -m, git add . and even git init where the files were. Nothing worked.
Can you please help restoring version control for my project?
UPDATE:
Answers for the questions in commens (and answers):
my git repository is on my local hard drive.
I went to the Organiser-repository pane in XCode and I see my recent git commit -m "sth" as "sth" az a commit. I have a single branch: master.
Im not sure what command would be good to test git, as my commits work (theoretically).
I have a folder named .git in the project folder.
git log is working, showing the same as XCode Organiser-repository pane.
I think the XCode just can't synchronise with the git for some reason, and I don't know how to correct that.
First off, this is not an answer that will fix your problem, I just try to provide some help that might get you closer to a diagnosis.
Git stores its files in a folder named .git. Check if this folder is present in your project. If it's not then your Git repository is gone.
Next, try some basic command such as git log. For this to work, you must first cd to your project folder (or a subfolder thereof), because whenever you run a Git command it will look for the .git folder in the cwd or a parent folder. If git log does not work then your Git repository is broken in some way. Someone else will have to step in to further diagnose the problem, as I am no expert on this subject.
Finally, you should also check whether your rsync command has really sync'ed your project's .git folder with the backup's .git folder. Use this command:
diff -rq /path/to/project/.git /path/to/backup/.git
If there is no difference (as I would expect if rsync has worked correctly) then the problem with your Git repository is both in your project and in your backup. If there are differences then it might be worthwile to try your next steps on a copy of the backup (it should be fine to make the copy in the Finder).
Good luck.

Where does COMPASS expect to find the config.rb (if there are several)?

I'm introducing COMPASS to a project where we have different development branches from a SVN versioned web project in different folders for development. So we'll need to have several config.rb copies - the config.rb should be in trunk and thus in every branch we check out from SVN. How can I switch from "watching" the SASS directory in one branch checked out on my computer to watching another SASS directory in another branch checked out?!
Since the directory names for the checked out branched change with every new branch, having just one config.rb for COMPASS outside of / at the root directory of all branch directories is not an optimal solution since then we'd have to update every local config.rb on every developers computer with every new branch checked out...
Do I simply start "compass watch" in every branch's styles directory when working within that branch? Will there then be several COMPASS instances running, watching all the different branches?
I didn't find any answer to this problem on the internet, so I hope to find one here. Any idea welcome!
Cheers, Roman.
You can precise the location of the configuration file with the -c command line argument: compass watch -c custom/folder/config.rb. But be careful, all paths to match the configuration variables (sass_dir, css_dir, etc) depend on the initial path where the command Compass is launched. For example, you can place in a branch and point the configuration file present in the trunk.
However, the easiest way would be to have a configuration file by branch and start the compilation in each of them.

Resources