How to remove a file from PR -Git

by Deepak Dhakal 14. October 2017 03:49

Let's say if you have three files but you want to not merge a File using PR. There is a way.

Switch to the branch

$ git checkout YourBranch

Override from the master:

git checkout origin/master -- src/main/java/yourfile.jsp

Commit and push it to the remote:

git commit -m "Removed a modified file from pull request"
git push origin YourBranch



How to ignore files during merging to master in git

by Deepak Dhakal 13. October 2017 18:14


You have Branch A and you made many changes from the master but you do not want FileA to go to Master during merge even you change it. 


How to do it in git ?

Here git-update-index - Register file contents in the working tree to the index.

git update-index --assume-unchanged <PATH_OF_THE_FILE>


git update-index --assume-unchanged somelocation/pom.xml



Bi-directional Map in Java

by Deepak Dhakal 28. July 2017 06:10


You can use the Google Collections API for that, recently renamed to Guava, specifically a BiMap

A bimap (or "bidirectional map") is a map that preserves the uniqueness of its values as well as that of its keys. This constraint enables bimaps to support an "inverse view", which is another bimap containing the same entries as this bimap but with reversed keys and values.




public class BiMapTest {

  public static void main(String[] args) {

    BiMap<String, String> biMap = HashBiMap.create();

    biMap.put("k1", "v1");
    biMap.put("k2", "v2");

    System.out.println("k1 = " + biMap.get("k1"));
    System.out.println("v2 = " + biMap.inverse().get("v2"));



Validate Request in .net 4.0 returning 500 error

by Deepak Dhakal 28. July 2017 06:06


Make sure you don't have < httpRuntime> tag already in web.config

if it is already there, put the setting inside it.


Stock to watch for 2013

by Deepak Dhakal 2. January 2013 10:26



How to add unsupported device on windows for android development

by Deepak Dhakal 2. July 2012 17:21


For my case, I had HTC inspire which was not working for usb debugging.. 


So if you have HTC inspire phone and want to enable debugging


The Product ID for the Inspire is probably not in the android_winusb.inf file you have.

I was able to get the ADB installed by opening the android_winusb.inf in notepad and added the Vender and Product ID to it..

here's how it would look:

; HTC Dream

%SingleAdbInterface%        = USB_Install, USB\VID_0BB4&PID_0C01

%CompositeAdbInterface%     = USB_Install, USB\VID_0BB4&PID_0C02&MI_01

%SingleBootLoaderInterface% = USB_Install, USB\VID_0BB4&PID_0FFF

; HTC Magic

%CompositeAdbInterface%     = USB_Install, USB\VID_0BB4&PID_0C03&MI_01

; HTC Inspire

%SingleAdbInterface%        = USB_Install, USB\VID_0BB4&PID_0CA2

%CompositeAdbInterface%     = USB_Install, USB\VID_0BB4&PID_0CA2&MI_01


I just added in the HTC Inspire after the HTC Magic device.

I was able to install it after I did that.




Powered by BlogEngine.NET - Old School Theme by n3o Web Designers