Delete all commit history in GitHub
Bipul Raman
|
April 26, 2019
Problem Scenario: You want to delete all commit history but keep the code in its current state.
Solution: In order to achieve this, Deleting .git folder may cause problems in your Git repository. Therefore follow below steps through command line to solve the above problem scenario.
Step 1: Checkout to some new branch
git checkout --orphan new_branchStep 2: Add all the files
git add -AStep 3: Commit the changes
git commit -am "commit message"Step 4: Delete the master branch
git branch -D masterStep 5: Rename the current branch to master
git branch -m masterStep 6: Force update your repository
git push -f origin master
Create Self-Signed Certificate (.cer & .pfx)
Bipul Raman
|
October 18, 2018

Steps to create self signed certificate on Windows:
- Open visual studio Developer Command Prompt as administrator
- Execute below mentioned commands in sequential order. It will create a certificate with SHA.256
algorithm.You can modify parameters as per your requirements.
Command format:makecert –a SHA256 -sv SAMPLE.pvk -n "cn=SAMPLE" SAMPLE.cer -b <start_date> -e <end_date> -r
pvk2pfx -pvk SAMPLE.pvk -spc SAMPLE.cer -pfx SAMPLE.pfx
Example:makecert –a SHA256 -sv "C:\Sample.pvk" -n "cn=Sample" "C:\Sample.cer" -b "10/22/2018" -e "10/22/2019" -r
pvk2pfx -pvk "C:\Sample.pvk" -spc "C:\Sample.cer" -pfx "C:\Sample.pfx"
- Install the pfx file for current machine or current user as per requirements
UPDATE: (April 15, 2019)
Use this powershell command to create self signed certificate as MAKECERT command has been depretiated.Keeping a fork up-to-date on GitHub
Bipul Raman
|
August 28, 2018
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:
- Clone your fork from Origin
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
- Jump to the root directory of your cloned fork
cd {cloned fork path} e.g. cd D:\cloned\fork-repo
- 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
- Updating your fork from original repository to keep up with their changes
git pull upstream master
Subscribe to:
Posts
(
Atom
)
Popular Posts
Powered by Blogger.
