Posts

Extension Method in C#

Important points for the use of extension methods:
An extension method must be defined in a top-level static class.An extension method with the same name and signature as an instance method will not be called.Extension methods cannot be used to override existing methods.The concept of extension methods cannot be applied to fields, properties or events.Overuse of extension methods is not a good style of programming.

Essential commands for operating Git hub

Essential commands for operating Git hub git --version
git config --global user.name "sunnysinghdev"
git config --global user.email "sunnysingh.vpcoe@gmail.com"
git config --list
git diff//
git init // Create local git
rm -rf .git //remove git from local computer
git status
git reset filename
touch .gitignore // list file names to ignore file push.

// Directly push your changes to server.
git clone "https://domain/user/project.git"
git add -A // Add Changes
git commit -m "Message" // Commit your changes
git push

// Create a branch and then push your changes to server. git branch <branchName>
git checkout <branchName>
git add -A // Add Changes
git commit -m "Message" // Commit your changes
git branch master
git merge <branchName>
git pull -- rebose origin master  // update code from server
git push