Git Commands ๐Ÿ˜Ž

aryan inglearyan ingle
2 min read

Problems I encountered :

  1. When I am in branch(C_branch) and I commit some changes and then after I use the merge command trying to merge 'C_branch' to 'main' branch from the C_brach and it gave me "Already up to date." . When I go to the origin branch and verify the changes if they are there after merging into main , they did not merged .

    I merged the C_branch from the main branch using cmmd :

    git merge C_branch

    and it succesfully merged ; this was a mistake I made as a begginer in the git I hope you learn from my mistakes.

Commands I used :

  1. git push --set-upstream origin shipping_calculator_fixes

  2. git revert HEAD --no-edit

    HEAD :his refers to the latest commit in the current branch.

    --no-edit :This option is used to perform the revert without opening the default text editor to edit the commit message.

  3. git merge [source] [target]

What I learnt:

  1. git push --set-upstream origin shipping_calculator_fixes

    this command I used to push changes from the local repository's(Logistic_Shipping_rates) branch(shipping_calculator_fixes) to the remote repository .

  2. How to revert back to the old commit discarding the new changes and reverting back . After making changes need to stage the area and commit then start revert back if desired. So I tried playing with this command and explored a bit .

  3. How to merge a branch into main branch in command prompt.

0
Subscribe to my newsletter

Read articles from aryan ingle directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

aryan ingle
aryan ingle