Tuesday, 30 October 2018

git creating a branch and setting upstream branch

If you are working on a new task and you want to create a user branch and push it to remote, you can do so, using below methods.

Assuming you are in develop branch

git checkout develop #Recommended to always point your branch to same commit as develop
git pull                       #Recommened to get the latest from remote
git branch users/venkat/performanceFix #Creating new branch for your needs
git checkout users/venkat/performanceFix #Checking out branch locally
git push origin users/venkat/performanceFix  #Pushing the branch to remote
git push --set-upstream origin users/venkat/germanyThresholdChanges #Setting upstream branch for  current branch as the newly created branch


or

git checkout -b users/venkat/performanceFix Origin/venkat/performanceFix #single step if the remote branch already exists

or

If the remote branch already exists and you want to set the remote branch as current branch upstream.

git branch users/venkat/performanceFix
git checkout users/venkat/performanceFix
git branch --set-upstream-to origin/users/venkat/performanceFix

Monday, 29 October 2018

Finding Deleted file content in git

I was searching for a deleted file content and wanted to see which commit, the file was deleted. Finally, was able to resolve the same using the below commands.

git log -p -- DeletedFilePath  #Here, p stands for patch mode   or

git rev-list -n 1 HEAD -- DeletedFilePath # Here, we are printing commits in reverse chronological way


After I found the commit, I went to VSO to search for the commit. We can also find the commit content using below git command.

git show

How to Handle SSIS Database movement from one environment to another

Below are the steps to follow the movement of SSISDB from one environment to another: -- opening the existing Database master key in S...