Menu

How to cherry pick multiple commits from a branch to other?

It is very common practice to pull push and merge the changes from one branch to other branch for developer. Today we are going to see how we could cherry pick changes from one branch to other branch or from feature or working branch to master. Some times we come at a situation where we do not want to merge the complete branch into another branch, instead of complete merge or pull we just want to merge few commits from one branch to another, for that we have cherry pick option in git.

for example we are currently working on branch feature/fix01, and n commits are available on fix01 branch.
Now we want to cherry pick only commit A and B to master branch. to do so, please do the following steps.

Step 1: Open git bash.
git checkout fix01
git log
 $git log command will show all commits, with commit details. From here you can take the commit ID. Alternate to get the commit ID is from git UI, check for the commit SHA. As shown in below screenshot.

 
Step 2: Now checkout the master branch where we need to push the commits.
git checkout master
Step 3: Now run the cherry pick command
git cherry-pick a001 b001 // here a001 and b001 is commit IDs for A and B commit respectively.
if cherry-pick command didn't run successfully and halted due to some conflict, then go to repo and fix the conflicts and then came back to git bash and run the cherry-pick continue command.
git cherry-pick --continue

if you want to stop the cherry-pick or end the process, then run cherry-pick abort command.
git cherry-pick --abort

Step 4: If you cherry-pick was successful then run the git push to move the commits.
git push origin master/master
Step 5: Verify the changes.

References:




Building blocks in AEM

Building blocks is the feature associated with experience fragment in which we group two or more experience fragment together.
To understand it better we have to first understand the experience fragment. Experience fragment is a page or post, which we create using multiple small contents or grouping multiple content together in a template so we can easily reuse and publish that content. Experience fragment can have CTA(cal to action), images, text and inputs.

Why building blocks required?

Suppose we have a requirement where we need to show two or more experience fragment together as a single experience fragment, then using the building blocks we can group those experience fragment and  drop and show that building blocks as a single experience fragment in your post and page.

To make it more simple, building blocks is for combining two or more experience fragment into a single experience fragment.

How to create building blocks?





Failure authenticating with BASIC 'Sling (Development)'

Issue: When we try to replicate anything from author to publisher I am getting below error. and not even on any replication it keep printing the log in error.log file automatically after an interval. What could be the cause of this? 


24.10.2019 11:31:05.942 *INFO* [oak-repository-executor-1] com.adobe.granite.repository Service [34344, [org.apache.jackrabbit.oak.api.jmx.SessionMBean]] ServiceEvent REGISTERED
24.10.2019 11:31:20.180 *INFO* [sling-default-2812-com.day.cq.replication.impl.ReverseReplicator.22529] org.apache.commons.httpclient.auth.AuthChallengeProcessor basic authentication scheme selected
24.10.2019 11:31:20.180 *INFO* [sling-default-2812-com.day.cq.replication.impl.ReverseReplicator.22529] org.apache.commons.httpclient.HttpMethodDirector Failure authenticating with BASIC 'Sling (Development)'@localhost:4503
24.10.2019 11:31:24.323 *INFO* [oak-repository-executor-1] com.adobe.granite.repository Service [34345, [org.apache.jackrabbit.oak.api.jmx.SessionMBean]] ServiceEvent REGISTERED


Resolution: This error message you are getting because, AEM author replication agent is unable to communicate with publisher instance due to bad credential (username and password). You might change the password of admin user in publisher and forget to update the password on default author agent. Once you will update the valid authentication credential in default author replication agent this error will be no more logged in the error.log file.

By default AEM system keep generating events and try to transport the same to publisher instance, every time it send the replication request to replication agent the authentication get failed thats why this log is get printed after a certain interval. 

Reference:

  1. https://helpx.adobe.com/in/experience-manager/6-3/sites/deploying/using/replication.html