Git – Ignore files during merge

I got over this issue by using git merge command with the –no-commit option and then explicitly removed the staged file and ignore the changes to the file. E.g.: say I want to ignore any changes to myfile.txt I proceed as follows: git merge –no-ff –no-commit <merge-branch> git reset HEAD myfile.txt git checkout — myfile.txt … Read more

Repack of Git repository fails

Your solution has got you a working copy locally and remotely, but will cause problems again when the remote repository decides to repack itself again. Fortunately, you can set config options that will reduce the amount of memory needed for repacking in both repositories — these essentially make the command line parameters that you added … Read more

can you host a private repository for your organization to use with npm?

https://github.com/isaacs/npmjs.org/ : In npm version v1.0.26 you can specify private git repositories urls as a dependency in your package.json files. I have not used it but would love feedback. Here is what you need to do: { “name”: “my-app”, “dependencies”: { “private-repo”: “git+ssh://[email protected]:my-app.git#v0.0.1”, } } The following post talks about this: Debuggable: Private npm modules

How to return a custom object from a Spring Data JPA GROUP BY query

Solution for JPQL queries This is supported for JPQL queries within the JPA specification. Step 1: Declare a simple bean class package com.path.to; public class SurveyAnswerStatistics { private String answer; private Long cnt; public SurveyAnswerStatistics(String answer, Long cnt) { this.answer = answer; this.count = cnt; } } Step 2: Return bean instances from the repository … Read more

How to generate a Dockerfile from an image?

How to generate or reverse a Dockerfile from an image? You can. Mostly. Notes: It does not generate a Dockerfile that you can use directly with docker build; the output is just for your reference. alias dfimage=”docker run -v /var/run/docker.sock:/var/run/docker.sock –rm alpine/dfimage” dfimage -sV=1.36 nginx:latest It will pull the target docker image automatically and export … Read more