DEV Community

gus
gus

Posted on

1

I'm mergin here

This week's lab was a good one, very functional learning regarding git merges which cleared up some things I hadn't worked out about github.

Last week when merging my partner's repo we encountered an issue where several files were in conflict. We opted to delete the conflicting files on his end to allow the merge, rather than going through line by line and seeing what was different and he kept backups so as to reintroduce any code that was cut if he so chose.

This week was a good way to see what the process of doing proper line by line comparison looks like, with two branches being merged one after the other. First, I logged issues for more relevant return codes and markdown horizontal rule syntax.

I then created branches for the respective issues, and wrote out the code for each change. One by one, I merged the branches to the main branch, with the second of course causing issues. I use github desktop and it made it very intuitive to open up an IDE and get line by line highlights with breakdowns of what was from each branch. I sorted out which changes were going through, saved, and merged. First the return code branch and then the horizontal rule branch.

It all went very smoothly, although I didn't test before I merged the branches and ended up having to push a fix to the main branch to get everything working afterward, but that was unrelated to this week's changes.

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay