This content originally appeared on DEV Community and was authored by Kaviya R
Today also, I come with some new commands that I have learned today.That are
- gitdiff
- gitcheckout
- gitmerge
- gitbranch
Gitdiff:
git diff is used to find the difference between the file in the working repo and the staging area.
gitcheckout:
git checkout in git is used to switch between different branches.
git checkout -b <new-branch-name>
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>
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
This will show the all the local branches.The current branch will be marked with "*".
This content originally appeared on DEV Community and was authored by Kaviya R

Kaviya R | Sciencx (2025-02-20T07:45:42+00:00) COMMANDS IN GIT. Retrieved from https://www.scien.cx/2025/02/20/commands-in-git-2/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.