paint-brush
Cherry-picking Your Teammate's Locally Uncommitted Changes in Gitby@FreddyCoen
351 reads
351 reads

Cherry-picking Your Teammate's Locally Uncommitted Changes in Git

by FreddyCoenOctober 7th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

GitLive’s cherry-picking feature would be even more useful for collaboration if it would allow for cherry-pick your teammate's locally uncommitted changes. Thereby two developers can conveniently interact and combine pair programming with TDD in a remote set up aka not passing the keyboard back and forth. This feature allows you to seamlessly let your teammates take over your local changes and review them locally getting rid of confusing commits. The co-founder of GitLive would be very interested to know how you would use this feature in your daily work.

Company Mentioned

Mention Thumbnail
featured image - Cherry-picking Your Teammate's Locally Uncommitted Changes in Git
FreddyCoen HackerNoon profile picture

We are all familiar with Git Cherry Pick — it allows us to pick arbitrary Git commits by reference and append them to the current working HEAD. This can be extremely useful for team collaboration, bug hotfixes, or restoring lost commits. However, this feature would be even more useful for collaboration if it would allow for cherry-picking your teammate's locally uncommitted changes! Sounds like a dream? Keep reading!

Consider the following:

Writing tests are often seen as overhead but let’s be honest, there is no doubt they render our code more stable and take us a step closer to utopia; a world without runtime errors. In order to encourage test-driven development, it needs to be more fun. One solution is to make it interactive also known as ping pong pairing

Ping pong pairing makes two developers come together to keep an emphasis on both test and production code. More precisely one developer writes a test for a certain behavior then requests the other developer to implement the behavior and make the test pass.

The ping pong match continues with each exchange being a new passing test. To facilitate this game, we need to be able to pass back and forth our local changes in a seamless experience which leads me to introduce GitLive’s cherry-picking feature. 

The cherry-picking feature allows you to take over your teammate’s local working copy changes in a one-click experience. Thereby two developers can conveniently interact and combine pair programming with TDD in a remote set up aka not passing the keyboard back and forth.

However, this feature allows for much more. How often have you been stuck and asked for help by committing and pushing your code in order to get help? It happens a lot even though the commit-push-fetch cycle seems ridiculously cumbersome to share unfinished code.

Besides, you should never commit broken changes in the first place. GitLive allows you to seamlessly let your teammates take over your local changes and review them locally getting rid of confusing commits.

As the co-founder of GitLive, I would be very interested to know how you would use this feature in your daily work. If you have any ideas on how to make it better to make your lives even more convenient reach out to me directly!

Also published on: https://medium.com/dev-genius/git-cherry-picking-locally-uncommitted-changes-too-good-to-be-true-30497a87c032