Skip to content

Instantly share code, notes, and snippets.

View nverinaud's full-sized avatar

Nicolas VERINAUD nverinaud

View GitHub Profile
@nverinaud
nverinaud / gist:3706079
Created September 12, 2012 11:33
Git workflow: project with libraries
# Add a library
$ git remote add -f lib/[libname] [lib-remote-URL] # Add the lib remote and fetch
$ git read-tree --prefix=lib/[libname]/ -u lib/[libname]/master # Import the library files
$ git commit -m "Add [libname] library." # Commit the added library
$ git push # We're done !
# Update to the latest version of a library
$ git pull -s subtree --squash --no-commit lib/[libname] master # Update files of the library