My question is this: I have a git repo with a directory in the .gitignore file. Normally this works and any files that are changed in the directory are ignored. However if I checkout files into the ignored directory from a branch that doesn’t ignore those files i.e.: git checkout a_branch /c/IgnoredDirectory I find that […]
I want to reorder the output of changed files in git commits so I’ve created a file called submodule/orderfile and configured diff.orderFile to point to that file. Now many problems arise If I add the file to .gitignore, the .gitignore will be listed as modified If I add the path submodule/orderfile to .git/info/exclude the file […]
When I do a build in my local repository, there is a local file that is in source control that keeps getting changed. Every time I do a Pull from origin, I keep getting the following error message: git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=manager-st fetch origin git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=manager-st pull […]
I am trying to make git ignore the opencv2.framework I have imported into my project. However, even though I am adding opencv2.framework into my .gitignore, every time I run git status on my terminal, all the opencv2.framework files are showing up as new files. Could anybody help? Thanks! This is what my .gitignore file looks […]
I know I can’t use them both at once, but is there a way to make .npmignore file extending .gitignore? I have dozens of rules in .gitignore and I want to use them all + one additional for npm package. How can I do it without duplicating all the rules?
I’m developing some source codes in ASM but I don’t want to save the binaries and obj files, all folders are a new “projects”, everything is ok but when I made some changes in Ubuntu not take any changes. Eg. / |- HelloWorld/ |- hello.asm |- hello.o |- hello |- SomeProject/ |- some.asm |- some.o […]
I want to ignore all the files in my folder structure apart from the following conditions: profiles (and all folders/files recursive) sites/xxx (and all folders/files recursive) Currently my gitignore file looks like: `*` !sites/xxx !sites/xxx/modules !sites/xxx/modules/* !profiles !profiles/xxx !profiles/xxx/* This doesn’t allow me to track sites/xxx/modules/new though, is there anyway round this.
Along the same lines as this question – How do I clone all remote branches with Git?, if I have set up a Github repository like so: $ git clone firstname.lastname@example.org:viatropos/spree.git mycart $ cd mycart $ git branch * master $ git remote add origin email@example.com:viatropos/mycart.git fatal: remote origin already exists. $ git remote add […]
When using sub-directory entries in .gitignore, “git clean -X” doesn’t clean the ignored sub-directory. $ git init test Initialized empty Git repository in /home/jpgariep/git/test/.git/ $ cd test/ $ mkdir -p a/b/c $ touch a/b/c/test $ echo ‘/a/b/’ > .gitignore $ git add .gitignore $ git commit -m “Added .gitignore.” [master (root-commit) 94e2825] Added .gitignore. 1 […]
I am new to git but have spent a good deal of time reading through documentation and gotchas on git submodules before trying them. I am having a problem that I feel — probably naively — is a bug in git: I have a project, in that root directory I have a plugins folder, which […]