Posts

Showing posts with the label git status

Git Merge Rebase and Cherry Pick - deep dive

Image
Hello guys 🙂 this post I would like to share with you about the " git merge " experiments. We have multiple code lines in the project, once the developer completes his task branch is ready to move to the next branch for testing.  Git Merge and git rebase There are multiple ways to combine the code lines. If the HEAD pointed to the tip of the branch then the best way to merge from the other branches into the current branch.  FF fast forward merge  3 Way merge You will be on the target-branch (most of the time it will be main/master or release or production) and then you will run the following command with a source-branch. git merge [branch-name] The following example for the Git Merge 'ort' Strategy, let's begin clear mkdir merge_test; cd merge_test; git init # on main branch two commits touch test1 ; git add . ; git commit -m "test1" touch test2 ; git add . ; git commit -m "test2" # branch out feature and do 2 commits git chec...

Git File Lifecycle

Image
In this post, we will explore, experiment and see git basic files and folder -related commands if you are familiar with the Linux file system this will be easy for you! But, again no need to worry about that we will see every command execution with experiments. Every software product/server Lifecycle can be visible with their STATUS output, where they are currently if you know then you can move to different Lifecycle state. Let's understand how this navigation happens on the Git repository. Git File lifecycle status changes with commands Git Status Git Status will always compare the files and folders with the indexed with untracked files and display their status.  Syntax: git status [options] This command will check the status of the current branch by comparing it with the master branch Example: git status -s This `git status` command will show the working tree status. and it is having multiple useful options. When you use the -s or --short option it will display the...