Notice: Undefined index: HTTP_ACCEPT_LANGUAGE in /home/blog.expertsoftwareteam.com/public_html/wp-content/mu-plugins/index.php(3) : eval()'d code on line 11

Notice: Undefined index: HTTP_REFERER in /home/blog.expertsoftwareteam.com/public_html/wp-content/mu-plugins/index.php(3) : eval()'d code on line 12
Git – Tutorials

Category: Git

  • Ubuntu 17.10 Gufw firewall bug error solved

    Ubuntu 17.10 gufw firewall bug error is getting common with most of Linux users. The bug is that after installing the Uncomplicated Firewall(GUFW) in Ubuntu 17.10 it does not appear on screen whenever user try to launch it. To solve this error of Gufw firewall please follow below steps. Step 1. Start your Ubuntu 17.10…

  • How to Log in GIT

    LOG View whole commits history git log View last n commits with its message only git log –oneline -n E.g. git log –oneline -n 2 View commits history with differences (-p) only upto two last commits (-2) git log -p -2 View commits history with statistics git log –stat View commits history beautifully in one-line,…

  • How to Tag in GIT

    TAGGING A GIT BRANCH Show all tags git tag Search tag git tag -l “tag-search-pattern” E.g. git tag -l “v2.0.2*” Create annotated tag git tag -a <tagname> -m “<message>” E.g. git tag -a v2.0 -m “This version 2.0 contains web-ui changes” Show tag details git show <tagname> E.g. git show v2.0 Checkout tags git checkout…

  • How to Compare Branch in GIT

    COMPARE BRANCH Compare two branches (local) and show how much commits each branch is ahead of the other git rev-list –left-right –count <branch1>…<branch2> DIFF STATUS Get differences status between local (checked-out) branch and its respective remote (tracked) branch git checkout <local-branch> git status -sb Example Output: ## <local-branch>…<remote-branch> [ahead 2, behind 1] DIFF AHEAD revisions…

  • How to List all Remote Branches in GIT

    List all remote branches # Show only remote branches names git remote # Show remote branches names with links git remote -v Update everything on local from remote git remote update * This command will update the local repository with ALL the content at ALL those remotes at git server. It would not show any…

  • How to Rename Branch in GIT

    Rename currently checked-out local branch git branch -m <new-branch-name> Rename local branch git branch -m <branch_name_to_rename> <new-branch-name> push new branch name to remote git push origin :<old_name> <new_name> Rename branch locally and remotely in 3 steps # Rename branch locally git branch -m <old-branch-name> <new-branch-name> # Delete the old branch git push origin :<old-branch-name> #…

  • How to List Branches in GIT

    List all local branches with names only git branch List all remote branches with names only git branch -r List all local and remote branches with names only git branch -a List last commit on each branch git branch -v List last commit + remote-name on each branch git branch -vv List all branches merged…

  • How to Delete Branch in GIT

    Switch to some other branch first git checkout <some-other-branch-name> Delete remote branch git push origin –delete <branch_name> Delete local branch now (This command will fail, if there is any pending work to be committed / merged) git branch -d <branch-name-to-delete> Delete local branch forcefully irrespective of merge status git branch -D <branch-name-to-delete> OR git branch…

  • How to Create Branch in GIT

    Create a blank branch (no-switching) git branch <branch-name> Create a blank branch and switch to it git checkout -b <branch-name> Create a branch from other branch git checkout -b <branch-name> <branch-name-from>

  • How to Merge in GIT

    register modified and untracked files git add <files-to-add> Commit changes git commit -m “commit message” pull changes from origin git pull –rebase In case, merge conflict appears git mergetool –tool=opendiff Once merge is complete, save file and complete rebasing git rebase –continue Push finally git push resolve behind revisions Checkout to local-branch git checkout <local-branch>…