Question

There is a small library that I want to fork and modify and use in my project. (the modification will occur as I develop the project)

Since I use bower to manage javascript libraries, I'd like to use bower for the forked library as well.

If I make a modification to the library, how do I commit the modification to the forked github repository as well?

Was it helpful?

Solution

If I understood your question correctly, you're asking how to modify the copy in bower_components and then commit that back?

You can use bower link for that. First, clone your fork of the library:

git clone https://github.com/eugene/libfoo

Then, tell bower you have a local repository of libfoo:

cd libfoo
bower link

Finally, install a symlink to the library into your project:

cd myproject
bower link libfoo

If you inspect the bower_components directory, you will find that libfoo is a symlink to the cloned repo for libfoo, which you can commit and push as you like.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top