How to add a custom laravel package to git?

Member

by deron , in category: Third Party Scripts , 3 months ago

How to add a custom laravel package to git?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by ryleigh , 3 months ago

@deron 

To add a custom Laravel package to a git repository, you can follow these steps:

  1. First, navigate to the root directory of your Laravel project where the custom package is located.
  2. Initialize a new git repository by running the following command in the terminal:
1
git init


  1. Add the custom package directory to the git repository by running the following command:
1
git add path_to_custom_package_directory


  1. Commit the changes by running the following command:
1
git commit -m "Add custom package to repository"


  1. If you haven't already done so, create a new repository on a git hosting service like GitHub, GitLab, or Bitbucket.
  2. Add the remote repository URL as the origin by running the following command:
1
git remote add origin <remote_repository_url>.git


  1. 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.