COMMANDS IN GIT - 2

And few more to add to the commands in git, 1.git diff "bshshshd" "ndhhdhdji" The git diff "bshshshd" "ndhhdhdji" command helps you to see,compare the difference between two commit hashtags so you can easily find the changes between them. 2.git branch & why git branch The branches in git are used When you want to add a new feature or fix a bug in your code so you can spawn a new branch and make the changes and you can push it to the main branch The git branch command will show the branches in your repository and the current branch you are in will be highlighted with the (*) symbol (e.g: *main). 3.git branch This command will create a branch and while you creating a branch you should never include spaces in the branch name instead use (-) or (_) inbetween the name . 4.git checkout -b This command also create a branch and switch to the created branch immediately 5.git checkout & git switch Both checkout and switch does the same thing by switching between branch 6.git merge If you want to merge the feature branch you should switch or checkout to the main branch and then you should use , git merge this will merge the changes to the main branch.

Feb 20, 2025 - 17:17
 0
COMMANDS IN GIT - 2

And few more to add to the commands in git,

1.git diff "bshshshd" "ndhhdhdji"

  The git diff  "bshshshd" "ndhhdhdji" command helps you to 
  see,compare the difference between two commit hashtags so 
  you can easily find the changes between them.

2.git branch & why git branch

  The branches in git are used  When you want to add a new 
  feature or fix a bug in your code so you can spawn a new 
  branch and make the changes and you can push it to the main 
  branch

  The git branch command will show the branches in your 
  repository and the current branch you are in will be 
  highlighted with the (*) symbol (e.g: *main).

3.git branch

  This command will create a branch and while you creating 
  a branch you should never include spaces in the branch name 
  instead use (-) or (_) inbetween the name .

4.git checkout -b

  This command also create a branch and switch to the created 
  branch immediately

5.git checkout & git switch

  Both checkout and switch does the same thing by switching
  between branch 

6.git merge

  If you want to merge the feature branch you should switch or    
  checkout to the main branch and then you should use ,
                git merge 
  this will merge the changes to the main branch.