Friday, October 18, 2019

Check the element exists inside the Array in Mongo DB

Description


The below mentioned query is used to check whether the specific element is exists in an array.


Query


db.getCollection('ProcessFlows').find({"Processes" : {$size: 1 ,$elemMatch: { "_t": {$exists: true}}}}) 

Saturday, October 12, 2019

Change author name / email of a commit


Step 1: git commit --amend --author="Author Name <email@address.com>"

Step 2: Press Escape key

Step 3: Type :x! and press Enter key

Step 4: git push origin –f (ticket number)

How to change last commit message in git lab



Step 1: git commit –amend

Step 2: Press Shift + i

Step 3: Edit your message

Step 4: Press Escape key

Step 5: Type :x! and press Enter key

Step 6: git push origin –f (ticket number)