The official website of Bipul Raman

Keeping a fork up-to-date on GitHub


When you are contributing to an open source repository on GitHub, you are allowed to make pull request only through forked repository. In that case, you will always need to keep your fork updated/in-sync with origin/master. You can follow below approach through command line to do that:
  1. Clone your fork from Origin
    git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
  2. Jump to the root directory of your cloned fork
    cd {cloned fork path} e.g. cd D:\cloned\fork-repo
  3. Add remote from original repository in your forked repository
    git remote add upstream https://github.com/ORIGINAL-USERNAME/REPO-YOU-FORKED-FROM.git
    git fetch upstream
  4. Updating your fork from original repository to keep up with their changes
    git pull upstream master

File comparision with Visual Studio Code


VS Code aka Visual Studio Code is one of the FREE, Open Source, lightweight and excellent code editor with several exciting features developed by Microsoft. One of them is comparing two files. Suppose you want to compare two XML file or CSV file or anything similar then you can use VS Code.
Here are the steps to compare two files:
  1. Keep two files (say File1 and File2) in a folder
  2. Open that folder in VS Code
  3. Right click on File1 and select the option 'Compare with Selected'
  4. Right click on File2 and select the option 'Select for Compare'
You can download VS Code from here : https://code.visualstudio.com/download

Customizing & Branding MasterPage in SharePoint Hosted App / Add-In

  Option 1: Set your own master page (for heavy customization & branding)

  • Create your custom master page, ex- bipul.master
  • Create a Module 'MasterPage' in your project to add the master page that you just created above
  • Add your custom master page to this module
  • modify the elements.xml in 'MasterPage' module as below and dont forget to replace your master page name in the code
  • <elements xmlns="http://schemas.microsoft.com/sharepoint/">
      <module name="MasterPage">
        <file path="MasterPage\bipul.master" type="GhostableInLibrary" url="_catalogs/masterpage/bipul.master"></file>
      </module>
    </elements>
    
  • Change the master page name for your App Pages as below:
  • MasterPageFile="~site/_catalogs/masterpage/bipul.master" 

Option 2: Use default master page ( for light customization & branding)

  • Add the below css in ContentPlaceHolderID="PlaceHolderAdditionalPageHead" to remove default headers and titles (SharePoint logo etc.) appearing in SharePoint Hosted app page
  • <style>
        #suiteBarDelta, #s4-ribbonrow, #s4-titlerow{display: none !important;}
        #contentRow{padding-top: 0px !important;}
    </style>
    
  • Add your custom css and js in ContentPlaceHolderID="PlaceHolderAdditionalPageHead"
  • Add your custom HTML body elements within ContentPlaceHolderID="PlaceHolderMain"