Tag: gitignore

Git, ignore all files except a few in subdirectories

I’ve been reading around forever now without a solution that matches my setup. I am developing a extra for a cms and I don’t want to keep all the cms files in my repo. The files I want to keep are: /_build/ [everything inside here] /core/components/mycomponent/ [everything inside here] However, I’d like to ignore all […]

Ignored files are still visible in Commit Changes window – IntelliJ 13

I went to: File > Settings… > Version Control > Ignored Files and I added some files using the + symbol > Apply > OK I pressed right click on the project folder: Git > Commit Directory… and the ignored files are still there (Commit Changes window). I also tried to restart IntelliJ, but there […]

git – revert update-index/ignored file so I can change branch?

I was trying to add an error log to my .gitignore file, and somewhere along the way read that I had to specifically untrack the file after adding it to .gitignore. Somehow, I wound up using this to do so: git update-index –assume-unchanged Logs/Err.log All looked well, until I went to switch to my develop […]

git prevent deleting ingored files

I need to have two different version of same file – one on local machine and one on the server (repo). I have put file to .gitignore, but now during each push it will delete file on the repo. What to do to prevent deleting file on the repo? Thank you!

Unignore specific Files in Subdirectory with .gitignore

I have a problem to get .gitignore to do what I want. My folder structure looks like so: assets ├── img | ├── thousands | ├── of | ├── folders | ├── KEEP_SOMETHING_IN_THIS_FOLDER | | ├── another | | ├── thousands | | ├── of | | ├── folders | | ├── KEEP_THIS_FILE_1.jpg | | […]

How can I avoid ignored files when I checkout a subtree branch?

I have a project with the following structure: . ├── development │   └── ignoredfile ├── .gitignore └── master └── masterfile The content of .gitignore file is development/ignoredfile Then I create a git repository and a development branch: git init . git checkout -b development git add . git commit -m “First commit” After that I […]

.gitignore is ignoring files in a directory

I have a .gitignore file which I am trying to only let git see the dirs and files in /wp-content/plugins/event-manager and /wp-content/themes/StringsV2. The one for the theme is working but the plugin one only includes the dir and ignores all the files. # Ignore everything in the root except the “wp-content” directory. /* !.gitignore !wp-content/ […]

Make .gitignore ignore everything except one file

I’m pretty new with the whole .gitignore thing so I hope someone can help me out with this. We’re developing with Xamarin and we would like to ignore the packages/ folder except one file which is placed in different (sub)directories. I would like to keep the following file: /packages/SQLitePCL.raw_basic.0.8.2/build/Xamarin.iOS10/SQLitePCL.raw_basic.targets But all the other folders and […]

git tracked a directory and ignored the subdirectories

The contents of my folder are: .cpanel/ .git/ .trash/ .vim/ bin/ etc/ laravel/ logs/ mail/ perl5/ php/ public_html/ repo.git/ ssl/ Here is my .gitignore file .* ~/.gitignore *.git/ access-logs/ etc/ logs/ mail/ php/ ssl/ tmp/ trash/ vendor/ error_log \.bak\. When I clone from my git repository, the laravel folder in my local machine shows as: […]

How to reliably check whether a file is ignored by git?

I’m encountering a problem where git check-ignore is not respecting .gitignore‘s ‘not’ (!) rules. It’s returning “Ignored” if a file matches any entry in the .gitignore file, regardless of whether that entry is telling it to not ignore the path (via the ! operator) git check-ignore‘s documentation states the return codes map as follows: EXIT […]

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