Posts

Managing Complexity With Git Tricks

Managing Complexity With Git
* PLAN YOUR COMMITS AHEAD OF TIME / REPLAN IF YOU NEED TO
Have a road map to approach a problem (focus on gaining knowledge/reading code / talk to people) USE SINGLE PURPOSE BRANCHES
Notice when you are working something else than the purpose of the branch
Notice when if a commit has value independent of the branch - CHERRY PICK onto master. git commit -m 'Wonderful Refactoring' git checkout <Develop_Branch> git cherry-pick <SHA OF Wonderful Refactoring / Branch Name when HEAD Commit> git checkout <Feature_Branch> git REBASE <Develop_Branch> --Rebase feature branch MAKE ATOMIC COMMITS - CAN BE DEPLOYED INDEPENDENTLY (CHERRY-PICK)
Use --patch option to split changes into multiple commits. select y/n on hunks git add -p git add --patch WRITE GOOD COMMIT MESSAGES
Descriptive Commit messages and get the thoughts out of your head into the system REWRITE YOUR HISTORY TO TELL A STORY - EARLY AND OFTEN git re…

Find all DotNet Core Runtimes and DotNet Core SDKs installed on a system

##Find DotNet Core Runtimes
(dir (Get-Command dotnet).Path.Replace('dotnet.exe', 'shared\Microsoft.NETCore.App')).Name

##Find DotNet Core SDKs
(dir (Get-Command dotnet).Path.Replace('dotnet.exe', 'sdk')).Name

YAML Jump Start

Find Dead Code using the Code Analysis in your project.

https://stackoverflow.com/questions/30974433/get-list-of-zero-reference-codes-in-visual-studio/37579734
<?xml version="1.0" encoding="utf-8"?> <RuleSetName="Dead Code Rules"Description=" "ToolsVersion="12.0"> <RulesAnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis"RuleNamespace="Microsoft.Rules.Managed"> <RuleId="CA1801"Action=

Bitbucket change the user email to be used for code check-in.

Image
visit the user root directory 




open the global settings for the git (.gitconfig)

update the email in the file 



Restart the bitbucket and you should be able to see the new email that will be used for future check-ins.

x

Find the Versions of .Net Core Runtime and .Net Core SDK are installed on developer machine using power-shell

Using Powershell: Runtimes: (dir (Get-Command dotnet).Path.Replace('dotnet.exe','shared\Microsoft.NETCore.App')).Name SDK's: (dir (Get

IIS - Find the process IDs for using Visual Studio 'Attach to Process' feature

Image
Run the command prompt with Administrative privileges.

Type below command to see all the processes of hosted websites in local IIS.
C:\Windows\System32\inetsrv\APPCMD LIST WPNOTE: if you do not have the Administrative privileges you may see an error message as seen in below image.