I wrongly made two partitions with Boot Camp in the following way:
I found many solutions around the web but I don't want to lose any data from my hard drive.
How can I merge the partitions via terminal or any program?
Using the Disk Utility will not erase anything from Macintosh HD.
First, copy any file there can be on
Open the Disk Utility (it's in /Applications/Utilities). In the left bar, select your hard drive. From there, click the "Partition" tab in the right pane.
You'll see the "physical" partitioning of your drive there.
(No more screenshots from here, because I didn't want to delete my Windows partition.) Once done, drag the bottom-right corner of your