gitignore

How do I open source my Rails' apps without giving away the app's secret keys and credentials

时光总嘲笑我的痴心妄想 提交于 2019-11-28 17:54:31
I have a number of Rails apps hosted on GitHub. They are all currently private, and I often will deploy them from their GitHub repository. I'd like to be able to make some of them open source, just like the ones you can find on http://opensourcerails.com . My question is: How can I make these repositories public without giving away super secret credentials? For example, I can look in /config/initializers/cookie_verification_secret.rb and see the cookie secret for nearly every one of them. I don't understand how this is acceptable. Are these users all changing these values in their deploy

Recursive git update-index --assume-unchanged

笑着哭i 提交于 2019-11-28 17:49:06
I'm trying to run the following: git update-index --assume-unchanged myFolderToIgnore Where myFolderToIgnore is a folder. However it fails saying its "unable to mark" it. So I tried: git update-index --assume-unchanged myFolderToIgnore/ Which GIT responds to with Ignoring path myFolderToIgnore/ but doesn't do anything (it still sees my changes and tries to check them in). In the end I had to go in and manually mark each individual file as unchanged. What am I missing here? update-index is an internal plumbing command and thus not as comfortable as the real front-end commands. You will have to

add #*# glob to .gitignore?

╄→尐↘猪︶ㄣ 提交于 2019-11-28 17:41:53
I want to add emacs autosave files to my .gitignore with the glob #*# but of course, lines starting with a hash are comment lines. How can I get this into my .gitignore without it being treated as a comment? Did you try \#*# Since 1.6.2, \ should be supported in .gitignore (see this patch ) To be precise, 1.6.2.1 (March 2009) .gitignore learned to handle backslash as a quoting mechanism for comment introduction character " # ". Another way of escaping # is to use the character set syntax, so that your #*# glob becomes [#]*[#] in your .gitignore file. This doesn't exactly answer your question,

How to Add Linux Executable Files to .gitignore?

岁酱吖の 提交于 2019-11-28 17:24:07
How do you add linux executable files to .gitignore without giving them an explicit extension and without placing them in a specific or /bin directory? Most are named the same as the C file from which they were compiled without the ".c" extension. Can you ignore all, but source code files? For example: * !*.c !Makefile I would explicitly put them in the project .gitignore. It's not elegant, but I imagine your project doesn't have that many of them. Most developers usually have a build directory in their project where the actual build process in run. So, all executables, .o , .so , .a , etc.

gitignore not ignoring file

点点圈 提交于 2019-11-28 17:12:44
No matter what I put in .gitignore I can not get git to ignore the UserInterfaceState.xcuserstate file below: $ git status On branch master Your branch is up-to-date with 'origin/master'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: .gitignore modified: CalFoo.xcodeproj/project.xcworkspace/xcuserdata/wcochran.xcuserdatad/UserInterfaceState.xcuserstate I am using/editing the .gitignore file listed on this post . I tried everything to match the pattern including the

Is it possible to have a custom .gitignore? Read only access?

无人久伴 提交于 2019-11-28 16:55:42
问题 I am working in a team environment, and there is already a .gitignore file. I want to add more items to the .gitignore file, but I don't want to check this file in either. It is possible to set custom ignore files which only apply to me? Also, I want to give someone read only access to a private git repository on our server, if I add their SSH key to our server they will get full access like everyone else. How can I limit it to read-only, no commits allowed. 回答1: Put your private ignore rules

How could I ignore bin and obj folders from git repository?

柔情痞子 提交于 2019-11-28 16:47:05
I want to ignore bin and obj folders from my git repository. As I've found out, there is no easy way to do this in .gitignore. So, are there any other way? Using clean solution in Visual Studio? Tim Robinson I'm not sure why this doesn't work for you. In case it helps, here's a typical .gitignore file from one of my Visual Studio/git projects: *.suo *.user _ReSharper.* bin obj packages Arvind Krmar simply making an entry in gitignore may not ignore files, you may need to commit it. I used the following method and worked for me git rm -r --cached . git add . then git commit -am "Remove ignored

How do I ignore all files in a folder with a Git repository in Sourcetree?

こ雲淡風輕ζ 提交于 2019-11-28 16:36:53
I have a Bitbucket Git repository managed with Sourcetree. I have two folders that I want to commit, but I need to ignore all the files in these folders, because they contain only temporary files. How can I do that? Add this to .gitignore: * !.gitignore Kalzem For Sourcetree users: If you want to ignore a specific folder, just select a file from this folder, right-click on it and do "Ignore...". You will have a pop-up menu where you can ignore "Ignore everything beneath: <YOUR UNWANTED FOLDER>" If you have the "Ignore" option greyed out, you have to select the "Stop Tracking" option. After

Removing .xcuserstate and DS_Store files from git

放肆的年华 提交于 2019-11-28 16:30:45
问题 In Xcode I noticed that .DS_Store and *.xcuserstate always change and don't need to be commited. So, I wrote a .gitignore file that contains this: .DS_Store *.xcuserstate among other entries. Then I used: git rm --cached *xcuserstate git rm ---cached .DS_Store To remove the these file types already under version control. However, when I go to merge Xcode tells me that there are changes that need to be committed. Those changes include .DS_Store files and .xcuserstate files. So, I tried this

Exceptions in .gitignore

丶灬走出姿态 提交于 2019-11-28 15:29:15
How to add an exception to .gitignore, like "ignore all the .dll files BUT myfile.dll"? Use ! to negate the pattern: *.dll !myfile.dll If you want to ignore whole folder, except some specific files, then write: MyFolder/* !MyFolder/CoolFile.txt This won't work: MyFolder/ !MyFolder/CoolFile.txt You can also ignore folders like !src/main/resources/archetype-resources/**/* you can also ignore nested folder with patterns like !**/src/test/resources/**/* You can have several .gitignore files working together in a hierarchical manner to achieve your goal. At the root level you may have: root *.dll