Skip to content

Instantly share code, notes, and snippets.

View alnahian2003's full-sized avatar
😀
“It works on my machine”

Al Nahian alnahian2003

😀
“It works on my machine”
View GitHub Profile
@uffanahmed
uffanahmed / List of all countries JSON.json
Created February 22, 2020 09:28
List of all countries database JSON
[
{
"id": 1,
"name": "Afghanistan",
"iso3": "AFG",
"iso2": "AF",
"phone_code": "93",
"capital": "Kabul",
"currency": "AFN"
},
@j8
j8 / git_empty_branch
Created February 14, 2014 08:32
Create new branch with empty folder structure
You can create a new empty branch like this:
$ git checkout --orphan NEWBRANCH
--orphan creates a new branch, but it starts without any commit. After running the above command you are on a new branch "NEWBRANCH", and the first commit you create from this state will start a new history without any ancestry.
The --orphan command keeps the index and the working tree files intact in order to make it convenient for creating a new history whose trees resemble the ones from the original branch.
Since you want to create a new empty branch that has nothing to do with the original branch, you can delete all files in the new working directory: