Skip to content

Instantly share code, notes, and snippets.

@adil1214
Last active July 27, 2020 16:15
Show Gist options
  • Save adil1214/85f379527679782a2401b3b627e96a3a to your computer and use it in GitHub Desktop.
Save adil1214/85f379527679782a2401b3b627e96a3a to your computer and use it in GitHub Desktop.
useful commands
# display x last commits one for each line
git log --oneline -n x
# quickly peek the available scripts
cat package.json | grep "scripts" -A 10
# clone a specific branch from a repo
git clone --single-branch --branch <branchname> <remote-repo>
# fetching all the branches and checking into one branch
git clone --branch <branchname> url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment