DEV Community

Kaviya R
Kaviya R

Posted on • Edited on

COMMANDS IN GIT-2

Today also, I come with some new commands that I have learned today.That are

       - gitdiff
       - gitcheckout
       - gitmerge
       - gitbranch
Enter fullscreen mode Exit fullscreen mode

Gitdiff:

  git diff is used to find the difference between the file in the working repo and the staging area.
Enter fullscreen mode Exit fullscreen mode

gitcheckout:

   git checkout in git is used to switch between different branches.
       git checkout -b <new-branch-name>
Enter fullscreen mode Exit fullscreen mode

This command is used to create the new branch and switch to the newly created branch from old one.

gitmerge:

    gitmerge is used merge the changes from one branch to another.
           git merge <branch-name>
Enter fullscreen mode Exit fullscreen mode

This commonly usually work from the branch you currently working and merge the branch that you have chosen(need to discuss)

gitbranch:

      gitbranch is used to manage the branches in git

             git branch
Enter fullscreen mode Exit fullscreen mode

This will show the all the local branches.The current branch will be marked with "*".

Top comments (0)