@deron
To add a custom Laravel package to a git repository, you can follow these steps:
- First, navigate to the root directory of your Laravel project where the custom package is located.
- Initialize a new git repository by running the following command in the terminal:
- Add the custom package directory to the git repository by running the following command:
1
|
git add path_to_custom_package_directory
|
- Commit the changes by running the following command:
1
|
git commit -m "Add custom package to repository"
|
- If you haven't already done so, create a new repository on a git hosting service like GitHub, GitLab, or Bitbucket.
- Add the remote repository URL as the origin by running the following command:
1
|
git remote add origin <remote_repository_url>.git
|
- Push the changes to the remote repository by running the following command:
1
|
git push -u origin master
|
Your custom Laravel package is now added to a git repository and pushed to the remote repository. You can now easily manage and collaborate on the codebase with others.