- Git restore deleted commit
Sometime you commit something but then accidentally deleted it and then you would like to bring it back or continue working on it. I had this happened to me and it was frustrating to redo everything I deleted. But then I found out there is a way to recover deleted commit. Well, you want to […]
- Git reset
Get list of commits to choose from git log Git reset can change the branch pointer to point to any commit in the tree. git reset –hard <hash> $ git reset –hard 07a2a46 HEAD is now at 07a2a46 Updated index.html If you quickly check the log, you will see no history of the commits […]
- Spring Boot Code Structure
It is very important to structure your code in a way that is maintainable and easy to work with. A lot of times developers drag their feet to work on a project that is unorganized and hard to follow. Your team members will appreciate the fact that you took the time to organize your code […]
- Spring Security – Authentication
First you need to the spring-boot-starter-security in you pox.xml Configure Spring security using java. This configuration is for APIs. Here we configure our AuthenticationManager, PasswordEncoder, and web security for http routes. Configure your Authentication Provider Configure your Login Filter…
- Git stash
The git stash command is used to stash away your current work and revert back to a clean working directory which matches the HEAD commit. Let’s say for example that you are in a middle of working on a feature branch and suddenly a customer issue comes up. At this point you want to […]