Whenever you want to squash last commits in a single commit:-
first check your log
git log
| javascript: (function ($) { var id = jQuery("#key-val").text(); var title = $("#summary-val").text(); var translate = {"ş": "s", "ö": "o", "ü": "u", "ı": "i", "ç": "c", "ğ":"g"}; var cleanedTitle = title.toLowerCase().replace(/[ğüşıöç]/g, function(match) { return translate[match]; }).replace(/[\s*]+/g, "-").replace(/^_/, "").replace(/_$/, ""); var cleanedId = id.toUpperCase().replace(/[ğüşıöç]/g, function(match) { return translate[match]; }).replace(/[s*]+/g, "-").replace(/^-/, "").replace(/-$/, ""); var storyType = "feature"; var branchName = storyType + "/" + cleanedId +"-" + cleanedTitle; navigator.clipboard.writeText(branchName); } )(jQuery); |
| # Add or install "coverlet.msbuild" into your project. Run below command to see coverlet output XML files. | |
| dotnet test xxx.test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover | |
| # Open a new PowerShell or CommandLine session. Run Sonarqube image. | |
| docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube | |
| # Check the latest version here https://www.nuget.org/packages/dotnet-sonarscanner and install the tool. | |
| dotnet tool install --global dotnet-sonarscanner --version 4.10.0 | |
| # For each update, you made in your code, run the below commands. |
Need to install below as dev dependency (yarn add --dev husky lint-staged prettier)
prettier - prettify the files that has been declared.husky - to run prettier before commit.lint-staged - add changes during precommit stage to the commit.Create .prettierrc.yml file and insert below content. This file should be at the root folder and you can configure as you wish.
trailingComma: 'es5'
tabWidth: 2
singleQuote: true
| <?xml version="1.0" encoding="utf-8"?> | |
| <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/"> | |
| <sitecore role:require="Standalone or ContentDelivery or ContentManagement"> | |
| <pipelines> | |
| <owin.identityProviders> | |
| <processor type="Foundation.Authentication.IdentityProviderProcessor , Foundation.Authentication" | |
| resolve="true" /> | |
| </owin.identityProviders> | |
| </pipelines> | |
| </sitecore> |
| <?xml version="1.0" encoding="utf-8"?> | |
| <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/"> | |
| <sitecore role:require="Standalone or ContentDelivery or ContentManagement"> | |
| <!-- Enables Federated Auth --> | |
| <settings> | |
| <setting name="FederatedAuthentication.Enabled"> | |
| <patch:attribute name="value">true</patch:attribute> | |
| </setting> | |
| </settings> |
| using Sitecore.Owin.Authentication.Configuration; | |
| using Sitecore.Owin.Authentication.Identity; | |
| using Sitecore.Owin.Authentication.Services; | |
| using System; | |
| using Microsoft.AspNet.Identity.Owin; | |
| namespace Foundation.Authentication | |
| { | |
| public class CreateUniqueUser : DefaultExternalUserBuilder | |
| { |
| using System.Linq; | |
| using System.Security.Claims; | |
| using System.Threading.Tasks; | |
| using Microsoft.IdentityModel.Protocols; | |
| using Microsoft.Owin.Security; | |
| using Microsoft.Owin.Security.Notifications; | |
| using Microsoft.Owin.Security.OpenIdConnect; | |
| using Owin; | |
| using Sitecore.Owin.Authentication.Configuration; | |
| using Sitecore.Owin.Authentication.Pipelines.IdentityProviders; |
| using System; | |
| using System.Drawing; | |
| using System.IO; | |
| using System.Reflection; | |
| using Microsoft.AspNetCore.Mvc; | |
| using OpenQA.Selenium; | |
| using OpenQA.Selenium.Chrome; | |
| namespace ScreenshotApi.Controllers | |
| { |