Table of Contents
Git: Important commands
git config --global user.name git config --global user.email git init ls -lart touch git add -A git clone https://github.com/gauravrjoshi/laravel_project.git git checkout master git checkout YOUR_BRANCH_NAME git status git add . git status git commit -m "commit message" git push origin YOUR_ANOTHER_BRANCH_NAME git checkout YOUR_BRANCH_NAME git pull origin YOUR_BRANCH_NAME git pull origin YOUR_ANOTHER_BRANCH_NAME git push origin YOUR_BRANCH_NAME git init git diff git remote add first-push-test https://github.com/gauravrjoshi/first-push-test.git git remote add origin https://github.com/gauravrjoshi/first-push-test.git git push origin master git mergetool git reflog –all
Git local configuration
git config --local user.email "username@email.com" git config --local user.name "User Name" git config --local credential.helper ""
Checking Your Settings
git config --list
https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control
You can fetch all branches from all remotes like this:
git fetch --all
Create a branch in Git from another branch
git checkout -b feature/YOUR_BRANCH_NAME main