Skip to content

Instantly share code, notes, and snippets.

@tzmartin
Last active January 3, 2021 17:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tzmartin/06531e94c84df6c30117dfbf223e8008 to your computer and use it in GitHub Desktop.
Save tzmartin/06531e94c84df6c30117dfbf223e8008 to your computer and use it in GitHub Desktop.
Say NO to Git Submodules

I really don't like submodules in Git. There's a much better way:

$ git remote add -f svbhack https://github.com/gfidente/pelican-svbhack.git
$ git merge -s ours --no-commit svbhack/master
$ git read-tree --prefix=themes/svbhack -u svbhack/master
$ echo "THEME = 'themes/svbhack'" > pelicanconf.py
$ git commit -m 'Import svbhack theme'

Now i can follow changes from upstream at my leisure. I can also conveniently maintain local changes. Even complex changes thanks to git's "rerere" feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment