Git submodules

Git submodules are a powerful way to use git as an external dependency management tool. It is basically a way to embed a repository into another. When you add a submodule in Git, the code of the submodule does not get added to the main repository, only certain information about the submodule does. It simply … Continue reading Git submodules

The Magic of Final Keyword in Java

In this post, we will discuss all things final in Java. Final Classes, Final Methods, Final Variables and finally Final Arguments. Final Classes Let us look at an example. We have a class A that is declared as final. https://gist.github.com/anjanashankar9/8adc9729a7b4d26d9bb110767b10d1fc Now let us try to create a subclass of A https://gist.github.com/anjanashankar9/5ad56b973687dab6c5bd60042ea5403a This will give a … Continue reading The Magic of Final Keyword in Java

Managing Multiple Github Accounts from a single machine

Recently, I ran into a situation where I needed to manage multiple Github accounts from a single computer. I have two github account, one related to work and the other for my personal repositories.It is a very simple combination of ssh and git config. Before I start explaining the steps for the same, let me … Continue reading Managing Multiple Github Accounts from a single machine