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

Written by FreddyCoen | Published 2020/10/07
Tech Story Tags: git-workflow | pair-programming | developer-tools | plugins | collaboration-tools | gitflow | tdd-workflow | programming

TLDR 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.via the TL;DR App

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!

Written by FreddyCoen | Co-Founder, Software Engineer & Developer Advocate
Published by HackerNoon on 2020/10/07