Tag: gitignore

Creating directory/file name rules for .gitignore

I’d like to set up some rules in my .gitignore whereby any directory or file with a name containing “_nogit” will be ignored. Examples: ../videos_nogit/… bigvideo_nogit.mp4 assets/_nogit/bigvideos… Thanks–

GIT How can I track empty folder with its permission

I need to track a folder (I’ll name it “root”) that contains empty folders. So I created an empty .gitignore for each empty folder, I added them but now I’d like to track its permissions (chmod 777 root -R). But nothing doesn’t change on git status

Should the .babelrc file be gitignored?

I have a project that uses babel, and I was curious if a .babelrc file is typically gitignored or not. I am using a couple of presets that are apart of the package.json file that I have in the .babelrc file so it seems like a .babelrc file should be in source control, but not […]

Git's .gitignore does not work with one or more asterisk qualifier +

This question already has an answer here: Regex-like shell glob patterns for gitignore 4 answers

exclude a subfolder that can appear multiple times

I have the following source tree: main_folder main_folder/data main_folder/subfolder1 main_folder/subfolder1/data main_folder/subfolder1/subfolder main_folder/subfolder1/subfolder/data ……………. ……………. What’s the proper .gitignore syntax, to exclude the data subfolder, wherever it appears in the source tree?

Node modules still appear after using gitignore

I am trying to push my project to github and heroku. Since I am using nodejs in my app , I have node_modules. Before I push I have created a file called .gitignore to ignore the node modules. Inside the file I have added node_modules and tried to push to the git hub from the […]

What exactly does GitHub's “create a new project” menu item “Git ignore” do?

I though gitignore was just a file where you could specify which files you didn’t want checked into your repo. Then, I saw in the menu to create a new repo, the option to specify a git ignore like so: I thought git ignore was for files. What does it even mean to git ignore […]

same directory name as in gitignore

i have a directory named target in my java project and want to ignore maven target directory in my .gitignore. But it also ignores a project directory with the same name, here is my .gitignore .idea/ target/ out/ How can i have a directory as same as the one that is ignored.

How to ignore files which is already versioned by git?

For example, when I run my java project in my local machine ,I want always comment some code which is used for user identification ,but of course, these local modification should never be commited and pushed to the remote. What can I do ? I know .gitignore file, but as I know , this can […]

Repository files showing in `git status`

I’m versioning my $HOME with git, but with an differently-named repository directory so that my prompt doesn’t always show git information. I have setup an alias for when I want to use git on my $HOME: alias gith=’git –git-dir=/home/ravi/.githome –work-tree=/home/ravi’ The repository directory .githome itself shouldn’t be showing up in a gith status, but it […]

Git Baby is a git and github fan, let's start git clone.