Commands
MongoDB
- mongosh : Start mongo shell
- use testDbName : Create a db named 'testCollectionsName' if not present, else use existing one.
- show collections : To see collections in a db.
- db.<collection_name>.insertOne({name:"John" , age:50}) : To insert a single element to collection_name. (If collections does not exist, it will create one and insert element in that collection.)
- db.<collection_name>.drop() : To delete the collection named collection_name.
- db.<collection_name>.find() : To find items in the collection named collection_name.
Git
- git branch -a : To see all the branches
- git branch -r : To see remote branches
- git checkout -t origin/<remote_branch_name> : To create a local branch tracking to the remote branch
- git checkout -b 01_02 --track origin/01_02 : To create a local branch named 01_02 and it will track to the remote branch origin/01_02
- git branch -D 01_02 : To delete the local branch named 01_02
- gh repo create : To create a github remote repository from local github cli.
Swagger
- http://localhost:8080/swagger-ui/index.html : Swagger default Url in Spring Data