Essential git Command
git remote add origin <remote_repo>
git config core.fileMode false
git add .
git commit -m "Initial Commit"
git remote set-url origin <remote_repo>
git remote -v
git stash --include-untracked
git pull origin master --allow-unrelated-histories
git commit -a
[Warning !!! Before Pushing Solve the merge conflict manually and then again commit -> then push]
git pull origin master
git fetch origin
git merge origin/master
git pull --rebase origin master
git push origin master
git fetch origin
git fetch origin branch_name
git merge/branch_name
Then solve merge conflict and commit.
git push --force origin master
git config --global user.name "user_name"
git config --global user.email "user_email"
git remote rm origin
git checkout -b <branch-name>
git pull origin <branch-name>
git clone -b <branch-name> <remote_repo>
git branch -m new_branch /* Current branch will be rename locally */
git push --set-upstream origin new_branch /* Push the new branch, set local branch to track the new remote */
git push origin --delete <branch-name>
git pull origin branchname --allow-unrelated-histories
git reset --hard HEAD^1
git diff your_file_name.php
git diff --cached your_file_name.php
git diff HEAD your_file_name.php
