I have a Laravel
project and I'm using a composer
. I have a library in it and I've found a small bug there. It's my custom library under the git
.
What is the fastest way to push that changes?
The only way I see from now is to:
git clone
my library to some temporary folder /vendor
dir) composer update
Could be there any other, faster way? I'd like make changes right in the vendor dir and somehow push that changes.
PS As an answer I want to receive
No, it's impossible to do faster because of x , y , z .
or
Yes, you can. For that you have to do x , y , z .
Untested…
Linux or macOS: Yes, you can. For that you have to do something like
Store your new code somewhere else as backup:
mv …/vendor/mylib/ …/vendor/mylib_backup/
Optional: Delete your temp repo:
rm -r ~/git/mylib/
Clone your repo:
git clone repo-url ~/git/mylib
Create a symlink so that if you go into …/vendor/mylib you are really in ~/git/mylib:
ln -s ~/git/mylib …/vendor/mylib
Run
composer update
Run
git status
Maybe you get some artefacts. You can ignore them in a .gitignore file.
Which system do you use? To create a symlink on Windows you can try mklink IIRC.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.