Sunday, October 28, 2018
Laravel Associate users with permissions and roles with spatie
This package allows you to manage user permissions and roles in a database.
https://github.com/spatie/laravel-permission
git : How can I determine the URL that a local Git repository was originally cloned from?
If you want only the remote URL, or referential integrity has been broken:
git config --get remote.origin.url
If you require full output or referential integrity is intact:
git remote show origin
When using
git clone (from GitHub, or any source repository for that matter) the default name for the source of the clone is "origin". Using git remote show will display the information about this remote name. The first few lines should show:C:\Users\jaredpar\VsVim> git remote show origin
* remote origin
Fetch URL: git@github.com:jaredpar/VsVim.git
Push URL: git@github.com:jaredpar/VsVim.git
HEAD branch: master
Remote branches:
If you want to use the value in the script, you would use the first command listed in this answer.
Git Branching - Basic Branching and Merging
Basic Branching and Merging
Let’s go through a simple example of branching and merging with a workflow that you might use in the real world. You’ll follow these steps:
- Do some work on a website.
- Create a branch for a new story you’re working on.
- Do some work in that branch.
At this stage, you’ll receive a call that another issue is critical and you need a hotfix. You’ll do the following:
- Switch to your production branch.
- Create a branch to add the hotfix.
- After it’s tested, merge the hotfix branch, and push to production.
- Switch back to your original story and continue working.
Basic Branching
First, let’s say you’re working on your project and have a couple of commits already on the
masterbranch.What's the difference between 'git pull'and 'git fetch?
The objective of both these commands is the same - to get updates from the remote repository to my local repository.
But, they work in a different way.
Git pull: when you do a git pull, it gets all the changes from the remote or central repository and attaches it to your corresponding branch in your local repository.
Git fetch: when you do a git fetch, it gets all the changes from the remote repository, stores the changes in a separate branch in your local repository and if you want to reflect those changes in your corresponding branches, use a git merge to do that.
To summarize,
git pull = git fetch + git merge
Wednesday, October 24, 2018
Subscribe to:
Posts (Atom)
-
https://www.nicesnippets.com/blog/laravel-9-comment-system-example-tutorial
-
Organization : Keeping each site's configuration in separate files makes the server easier to manage, especially when hosting multiple...
-
Laravel Queues allow you to delay a time-consuming task until a later time. By delaying the time-consuming task, you can improve the perfo...
