Skip to content

Instantly share code, notes, and snippets.

View sudoankit's full-sized avatar
📖
Reading.

Ankit sudoankit

📖
Reading.
View GitHub Profile
@sudoankit
sudoankit / repo-reset.md
Created September 1, 2018 11:49 — forked from heiswayi/repo-reset.md
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@sudoankit
sudoankit / c++Template.cpp
Created May 15, 2016 12:51 — forked from kodekracker/c++Template.cpp
Basic C++ Template for Competitive Programming
/*
* Note: This template uses some c++11 functions , so you have to compile it with c++11 flag.
* Example:- $ g++ -std=c++11 c++Template.cpp
*
* Author : Akshay Pratap Singh
* Handle: code_crack_01
*
*/
/******** All Required Header Files ********/