Skip to content

Instantly share code, notes, and snippets.

@danish1010
Last active January 4, 2019 05:25
Show Gist options
  • Save danish1010/b5815f9f5bfef36425ed2086a9120928 to your computer and use it in GitHub Desktop.
Save danish1010/b5815f9f5bfef36425ed2086a9120928 to your computer and use it in GitHub Desktop.
GIT cheatsheet

Checkout master version of a file

git checkout origin/master -- api/routes.ts

Merge changes from BranchA into BranchB

git checkout BranchB
git merge BranchA

How to delete a git submodule

[submodule "externals/shopify_revfluence"]
    path = externals/shopify_revfluence
	  url = git@github.com:Revfluence/shopify_python_api.git
   
> git rm externals/shopify_revfluence

How to add a git submodule

git submodule add --force https://github.com/Shopify/shopify_python_api.git externals/shopify_revfluence
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment