Skip to content

Instantly share code, notes, and snippets.

View Muhammad-waqar-uit's full-sized avatar
🚤
On Pace

Muhammad Waqar Muhammad-waqar-uit

🚤
On Pace
View GitHub Profile
@Muhammad-waqar-uit
Muhammad-waqar-uit / new empty git branch.md
Created May 26, 2024 19:33 — forked from ozh/new empty git branch.md
Create a new empty branch in Git
$ git checkout --orphan NEWBRANCH
$ git rm -rf .

--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.

You can then start adding files and commit them and they will live in their own branch. If you take a look at the log, you will see that it is isolated from the original log.

@Muhammad-waqar-uit
Muhammad-waqar-uit / [email protected]@4.7.3...token...ERC721...ERC721.sol
Created August 29, 2022 22:09
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol)
pragma solidity ^0.8.0;
import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";