Tag: gitignore

gitignore my windows username

My Keil projects often store a .username file which I want to ignore using gitignore. I thought I could do *.$(echo %username%) in my .gitignore, since echo %username will print my name in the regular Windows prompt. I am using git bash, and appearently it cannot fetch these global variables (path, username, appdata etc). How […]

Git issue related to VS 2012 project files

I am trying to use git with VS 2012 i have facing some problems. I have not change any file of my .net web application. I just run my application and VS team explorer showing a lot of files to commit. I have added the git ignore and git attribute files as well. So please […]

How to ignore all but certain files/directories with Git..?

I see similar questions, but I’m not finding anything that will do what I’m trying to do for some reason. I have a CodeIgniter PHP library that I maintain, so my project is a full CI install that includes my library. I’m trying to ignore everything except the files that make up my library. I […]

How to ignore folder in GitHub correctly?

In my .gitignore file I added a path to folder I don’t want to see in GitHub website: Results/.ipynb_checkpoints/ Then I push this changes: git commit -a -m “add ignore” git push origin master But when I go to site, I still see this folder. How to do it correctly?

How do I ignore numeric logs in git?

Python RotatingFileHandler creates logs like foo.log, foo.log.1, …, foo.log.213…. How do I ignore all these in git? (I know that *.log are ignored automatically). E.g., adding *.log.[0-9] *.log.[0-9][0-9] *.log.[0-9][0-9][0-9] to .gitignore would probably work for the first 1,000 log files, it looks ugly. Is there a better way?

How to filter history based on gitignore?

To be clear on this question, I am not asking about how to remove a single file from history, like this question: Completely remove file from all Git repository commit history. I am also not asking about untracking files from gitignore, like in this question: Ignore files that have already been committed to a Git […]

Git Ignore strangeness

In my repo I have the following directory structure: / |-dir1 | |-file1 | |-file2 | |-file3 |-dir2 | |-file4 | |-file5.derp | |-file6 |-dir3 |-file7 |-file8 My .gitignore file (located at the root) is as follows: dir2/ !dir2/*.derp However, file5.derp is never found by git add… What am I missing here?

gitignore settings included in commit

I’m trying to commit the right files in git, but having problems configuring my gitignore properly. I followed the instructions here to create the gitignore file (django project): # File types # ############## *.pyc *.swo *.swp *.swn # Directories # ############### logs/ # Specific files # ################## projectname/settings.py # OS generated files # ###################### .DS_Store […]

How to use “!” in .gitignore as a string

I have directory which starts with exclamation mark, like: !test I want to add it in gitignore, but this doesn’t seem to work: \!test What is the correct way to do this?

Multiple .gitignores in a single project

I am having an issue managing my .gitignore file for a website I’m working on. I am storing my website on multiple repositories that require different files to be hidden or visible from git. For example: I don’t want my Github repository to store images or database information. My production server on the other hand […]

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