0% found this document useful (0 votes)
2 views

Git commands

Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Git commands

Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

stash--

git stash
git stash -u
// If added new folder
git stash apply

Git commits:
git status
- to check which branch you're on and lets you see if you have changes on your
local.

Create branch:
git checkout -b branch_name

To push:
git add .
git commit -m "msg here"
git push origin branch_name

force push:
git push --force origin <branch-name>

To pull:
git pull origin master/branch_name

To clone:
git clone repo_link

To initialize and add git repository to current project folder:


git init
git remote add origin repo_link
git remove -v (to check if successfully initialized)

// after cloning a repository from GitLab

composer install
// to run artisan

php -S localhost:8000 -t public


// to connect code to postman

php artisan serve


// then copy to postman

ex: http://localhost:8000/api/v1/account/login
// after 8000 put directory from router web.php

php artisan make:model TryModel


// artisan syntax making Model

php artisan make:controller ThisIsController


// making Controller

You might also like