Skip to content

Instantly share code, notes, and snippets.

@WhatsARanjit
Created August 27, 2014 21:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WhatsARanjit/c7b94a1dd3d70bb4ac83 to your computer and use it in GitHub Desktop.
Save WhatsARanjit/c7b94a1dd3d70bb4ac83 to your computer and use it in GitHub Desktop.
How to remove lines from a git commit
Avoiding certain lines, append them with "#gitignore" and add these files to your repo:
# .gitattributes
*.pp filter=gitignore
# .gitconfig
[filter "gitignore"]
clean = "sed '/#gitignore$/'d"
smudge = cat
Example line that shouldn't be included #gitignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment