Git Commands ๐
Problems I encountered :
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 :
git push --set-upstream origin shipping_calculator_fixes
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.
git merge [source] [target]
What I learnt:
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 .
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 .
How to merge a branch into main branch in command prompt.
Subscribe to my newsletter
Read articles from aryan ingle directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by