Skip to content

Instantly share code, notes, and snippets.

@shrestharikesh
Last active September 6, 2020 09:54
Show Gist options
  • Save shrestharikesh/033bb591b1cb82c8ebd08f03ccc3cde3 to your computer and use it in GitHub Desktop.
Save shrestharikesh/033bb591b1cb82c8ebd08f03ccc3cde3 to your computer and use it in GitHub Desktop.
Collection of some advanced git commands

Advanced Git Commands

  1. To ignore unstaged changes: git commit -- .

  2. To stop tracking a file or folder that was added earlier but later added to .giignore:
    git rm --cached <file>
    git rm -r --cached <folder>

    WARNING: While this will not remove the physical file from your local,
    it will remove the files from other developers machines on next git pull.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment