Results: 1578
Notes
  • Newest first
  • Oldest first
  • Newest first(All)
  • Oldest first(All)
Git tag
Git, tags are used to typically to indicate important milestones such as
releases 
or
version 
numbers. Lightweight tags:
git tag v1.0.0 // tags for previous commits (refers to the last commit)
git tag v1.0.0 <commit-hash> // tag for specific commit
Annotated tags:

git tag -a v1.0.0 -m "Version 1.0.0 release"
checkout to tag:
git checkout v1.0.0
git checkout master // to return the last commits again
Listing all tags:
git tag
Deleting a tag: // deletes only tag - not commits
git tag -d v1.0.0
Create a tag for a branch:
git tag v1.0.0 master
push tag to a remote repository
 git push origin v1.0.0
by Luka Tatarishvili
2 years ago
0
Git
commands
0
Fresh and Seed only one table/seeder
 php artisan db:seed --class=RoleSeeder
While using docker
./vendor/bin/sail php artisan db:seed --class=RoleSeeder
by Luka Tatarishvili
2 years ago
0
PHP
0
git reflog
Using the git reflog command should reveal Git's internal diary of all of the commits that HEAD has pointed to in your local repository—even the ones you thought were lost forever (assuming they weren’t old enough to have expired).
by Tinatin Kvinikadze
2 years ago
0
Git
git reflog
0
git whatchanged --since='2weeks ago'
Shows commit logs and diff output each commit introduces.
by Tinatin Kvinikadze
2 years ago
0
Git
Git whatchanged
0
git merge --squash
The git merge --squash command combines changes from one branch into another branch but does not create a merge commit. Step 1: Initialize project
git init
Step 2: create index.html file and 2 commit m1,m2 add text "m1" into index.html and commit as m1

echo "m1" > index.html
git add .
git commit -m "m1" 
add text "m2" into index.html and commit as m2

echo "m2" >> index.html
git add .
git commit -m "m2" 
Step 3: create feature branch and checkout
git checkout -b feature
Step 4: create feature folder&file create feature.html into the feature folder and add text "f1" then commit as f1

echo "f1" >> feature/feature.html
git add .
git commit -m "f1" 
Step 5: Checkout to master
git checkout master
Step 6: add text "m3" into index.html and commit as m3

echo "m3" >> index.html
git add .
git commit -m "m3" 
Step 7: Checkout to feature
git checkout feature
Step 8: add text "f2" into feature.html and commit as f2

echo "f1" >> feature/feature.html
git add .
git commit -m "f2" 
Step 9: Checkout to master
git checkout master
Step 10: Merge feature branch into master with squash
git merge --squash feature
Step 11: See git status because files we will have into the staging area and we need create a commit for it

git status
git commit -m "Merge feature branch into master"
by Luka Tatarishvili
2 years ago
0
Git
commands
1
git rebase
The git rebase command moves or combines a sequence of commits from one branch onto another branch. Step 1: Initialize project
git init
Step 2: create index.html file and 2 commit m1,m2 add text "m1" into index.html and commit as m1

echo "m1" > index.html
git add .
git commit -m "m1" 
add text "m2" into index.html and commit as m2

echo "m2" >> index.html
git add .
git commit -m "m2" 
Step 3: create feature branch and checkout
git checkout -b feature
Step 4: create feature folder&file add text "f1" into feature.html and commit as f1

echo "f1" >> feature.html
git add .
git commit -m "f1" 
Step 5: Checkout to master
git checkout master
Step 6: add text "m3" into index.html and commit as m3

echo "m3" >> index.html
git add .
git commit -m "m3" 
Step 7: Checkout to feature
git checkout feature
Step 8: rebase master branch into feature
git rebase master
Step 8: add text "f2" into feature.html and commit as f2

echo "f2" >> feature.html
git add .
git commit -m "f2" 
Step 9: Checkout to master
git checkout master
Step 10: Merge the feature branch into master
git rebase feature
by Luka Tatarishvili
2 years ago
0
Git
commands
0
git merge
The git merge command combines changes from one branch into another branch and creates a new "merge commit" that represents the merge. Step 1: Initialize project
git init
Step 2: create index.html file and 2 commit m1,m2 add text "m1" into index.html and commit as m1

echo "m1" > index.html
git add .
git commit -m "m1" 
add text "m2" into index.html and commit as m2

echo "m2" >> index.html
git add .
git commit -m "m2" 
Step 3: create feature branch and checkout
git checkout -b feature
Step 4: create feature folder&file create feature.html into the feature folder and add text "f1" then commit as f1

echo "f1" >> feature/feature.html
git add .
git commit -m "f1" 
Step 5: Checkout to master
git checkout master
Step 6: add text "m3" into index.html and commit as m3

echo "m3" >> index.html
git add .
git commit -m "m3" 
Step 7: Checkout to feature
git checkout feature
Step 8: add text "f2" into feature.html and commit as f2

echo "f1" >> feature/feature.html
git add .
git commit -m "f2" 
Step 9: Checkout to master
git checkout master
Step 10: Merge the feature branch into master
git merge feature
as the result, we will get a new commit
 Merge branch 'feature'  
by Luka Tatarishvili
2 years ago
0
Git
0
git blame
Displays the
author and last commit information
for each line in a file, helping track the origin of changes. Create a file and add some content:
echo "Line 1" > myfile.txt
echo "Line 2" >> myfile.txt
echo "Line 3" >> myfile.txt
Add and commit the file:
git add myfile.txt
git commit -m "Initial commit"
Make changes to the file and commit them
Make changes to the file and commit them
git blame myfile.txt
02fa3e76 (Luka 2023-06-01 20:07:40 +0400 1) Line 1
02fa3e76 (Luka 2023-06-01 20:07:40 +0400 2) Line 2
02fa3e76 (Luka 2023-06-01 20:07:40 +0400 3) Line 3
91354ada (Luka 2023-06-01 20:08:10 +0400 4) Line 4
91354ada (Luka 2023-06-01 20:08:10 +0400 5) Line 4
7ba66ba6 (Luka 2023-06-01 20:08:23 +0400 6) Line 5
by Luka Tatarishvili
2 years ago
0
Git
commands
3
git revert
Reverts the changes made in a specific commit by creating a new commit that undoes those changes.
echo "This is the initial content." > myfile.txt
add and commit file
git add myfile.txt
git commit -m "Initial commit"
make changes
echo "This is the modified content." > myfile.txt
git add myfile.txt
git commit -m "Modified myfile.txt"
revert last commit
git revert HEAD
or we can use specifying with the commit ID
git revert 4c04ecc
git log will return
 Revert "added file 4" --- Commit name

    This reverts commit 4c04eccff32e195ac0df17b1543f7f81de32d938. --- Commit id
by Luka Tatarishvili
2 years ago
0
Git
commands
3
Git grep
"git grep "example" git grep command allows you to search for specific patterns within your Git repository This command will search for the word "example" in all tracked files in your repository and display the file names and the lines where the word is found. Example: Create files
echo "This is an example file" > file1.txt
echo "Another example file" > file2.txt
Add the files
git add file1.txt file2.txt
git commit -m "Initial commit"
Search for the word "example"
git grep "example"
Use a regular expression to search for words starting with "ex":

git grep "ex\w*"
Perform a case-insensitive search for the word "example":
git grep -i "example"
by Luka Tatarishvili
2 years ago
0
Git
commands
strings
5
Results: 1578