Posts

How to rebase chain of git changes on master ?

 If you have splitted your commit in a chain and asume something is changed on master. Here is easiest trick to rebase on master.  1. Checkout topmost change in change branch like  git fetch ssh://gitrepoexample/changes/00/00000/0 && git checkout -b change-000000 FETCH_HEAD 2. Now rebase your branch on master  git rebase master  3.  Ammend your last change and push  git commit --amend && git push origin HEAD:refs/for/master  All done. Best of luck.

input stream or file to X509Certificate

InputStream inStream = null; try { inStream = new FileInputStream("fileName-of-cert"); CertificateFactory cf = CertificateFactory.getInstance("X.509"); X509Certificate cert = (X509Certificate)cf.generateCertificate(inStream); } finally { if (inStream != null) { inStream.close(); } }

currency convertor

View Local Commit that are not pushed to remote

git log --branches --not --remotes

Git reset to HEAD from cherry-pick

A cherry-pick is basically a commit, so if you want to undo it, you just undo the commit. when I have other local changes Stash your current changes so you can reapply them after resetting the commit. $ git stash $ git reset --hard HEAD^ $ git stash pop # or `git stash apply`, if you want to keep the changeset in the stash when I have no other local changes $ git reset --hard HEAD^

Freezing Android Studio

Is your android studio is freezing? 1. Are you using ubuntu ? Yes , then kill your studio process. 2. Still studio is not going away. Yes, Go to search apps and open task manager and kill studio process and java process.

Software Qualities

1. Maintainability. 2. Correctness. 3. Re-usability. 4. Reliability. 5. Portability. 6. Efficiency.