Tag: gitignore

Git: ignore file.ext1 only if file.ext2 exists

This question already has an answer here: Gitignore a file if file with different extension exists 2 answers

Ignore dynamic named folders

My test tool stores snapshots of all screens it encounters in a snapshots folder and I don’t want to version control them. The action folder however is dynamic and it creates a new folder every time the test is executed, like action1, action2, action3, etc. So I have this now, but it doesn’t work: Test/Action*/Snapshots/ […]

How to handle upload folder in git & wordpress devlopment workflow

I am currently learning use git & wordpress development workflow: develop the wp site locally in mamp enviroment; push the local wp repo to the remote repo in my serve; use git hook to automatically push the repo in my server to server site folder; but there is a problem in this workflow, if the […]

Eclipse GIT reindex loop plus append .gitignore

After a clean install of STS – Spring Tool Suite, whenever it starts the indexing process never ends. lots of buiding workspace (Sleeping) occour in the progress view afted investigation, and just by luck I found opening Team View that .gitignore was appearing and desapearing. Every time a new entry /targetis appended to the file […]

gitignore file type within root directory only

I’m trying to ignore all .log file types (ie foo.log) in the repository root directory ONLY. Both *.log and /*.log match all files of that type within the root directory, but they also match recursively (ie /foo/bar/baz.log) Note: I’m using git on windows (git extensions) How do I match all files with a specific file […]

git: ignore a file on pull from remote1, but push local version to remote2

I have 3 git repositories: local: my development repo on my local machine; remote1 used for collaboration with other developers; remote2 which is a Production server. I would like to pull regularly from remote1 to my local repo and keep some local tracked files intact (i.e. fetch and merge from remote1, but exclude some local […]

Completely independent Git project within another project using only gitignore

Is it possible to work with two independent git projects, one within another in the directory tree and separate them using only gitignore (without submodules or subtrees)? Here is the folder structure: repo_a <– repository A folder /.git /folder_1 /folder_2 /repo_b <– repository B folder (to be ignored by repository A) /.git /folder_3 /folder_4

Impossible to checkout Git code for Windows 8 via TortoiseGit or msysGit. Works fine with Ubuntu Git. “Submodules error”

My Setup: OS: Windows 8 x64 I use these VCS: msysgit https://msysgit.github.io/ and TortoiseGit: https://tortoisegit.org/ Server: Zend Server (LAMP) for Windows So Git Checked-out around 60 MiB, the rest was Vendors stuff. So it just stuck. And did not checked out whole 300 MB Erorr reported by “msysgit” (Windows Git+): “C:\Program Files (x86)\Git\bin\git.exe” clone -v […]

how to remove the existing versioned file from git

I want to avoid my fabfile.py from being versioned in git. I did these steps: copied file to fabfile.default.txt file as backup removed fabfile.py git rm –cached fabfile.py added fabfile.py into .gitignore then committed the removed file including .gitignore file. but then, if I create my fabfile.py again locally, it again shows up in git […]

Git add . failing on subdirectory that has a .git folder, even though being ignored

We have a deep directory structure with multiple README files at different levels. For instance: gitignoretest/ |– 00README |– dir1 | |– 00README | |– dir1 | | |– 00README | | |– dir1 | | |– dir2 | | |– dir3 | | |– file1 | | `– file2 | |– dir2 | | […]

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