Cherry-Pick Your Teammate’s Changes Without Push ‘n Pull-ing To Your Repo In PhpStorm

You asked your teammate for help with a piece of code and they showed you the solution in their editor. Now you need to fetch those changes. Usually, this would mean a series of tedious Git commands for both of you (not to mention that the changes will…


This content originally appeared on DEV Community and was authored by Sunny

You asked your teammate for help with a piece of code and they showed you the solution in their editor. Now you need to fetch those changes. Usually, this would mean a series of tedious Git commands for both of you (not to mention that the changes will forever grace your git history), but no longer - GitLive allows you to cherry-pick your teammate's changes straight from their local files without having to push and pull to Git.

In PhpStorm, open up the team window by clicking on the GitLive icon on the bottom tool window bar.

IMG-1.png

This will show a list of your teammates, if they are online (or away) and the issue they are currently working on. Click the arrow on the left-hand side of the teammate that helped you to see the repositories they have cloned, locate the one they made the changes to and click the arrow beside that too.

IMG-2.png

Here, you can see the list of files changed by your teammate on their branch compared to the main branch. Files with asterisks next to the file icon contain changes made locally by your teammate that have not yet been pushed to the remote repository.

Since we are only interested in their local changes, click the filter icon at the bottom of the team window to filter to only the unpushed changes.

IMG-3.png

Now we can see the single file that contains the solution we want to copy! Clicking on it will open a diff of the changes so we can make sure it contains only the changes we need. Now all we need to do is to right click on the file and select the cherry-pick option to pick the changes. And voilà - no need for any git push- or git pull -ing!

IMG-4.png

You can also perform the cherry pick at the level above if you want to pick all changes from multiple files at once by right-clicking on the repository and selecting the cherry-pick option.

IMG-5.png

Don't have the GitLive extension installed yet? You can find GitLive here, and if you want to learn more, check out this blog post or the GitLive docs.


This content originally appeared on DEV Community and was authored by Sunny


Print Share Comment Cite Upload Translate Updates
APA

Sunny | Sciencx (2021-12-01T14:49:57+00:00) Cherry-Pick Your Teammate’s Changes Without Push ‘n Pull-ing To Your Repo In PhpStorm. Retrieved from https://www.scien.cx/2021/12/01/cherry-pick-your-teammates-changes-without-push-n-pull-ing-to-your-repo-in-phpstorm/

MLA
" » Cherry-Pick Your Teammate’s Changes Without Push ‘n Pull-ing To Your Repo In PhpStorm." Sunny | Sciencx - Wednesday December 1, 2021, https://www.scien.cx/2021/12/01/cherry-pick-your-teammates-changes-without-push-n-pull-ing-to-your-repo-in-phpstorm/
HARVARD
Sunny | Sciencx Wednesday December 1, 2021 » Cherry-Pick Your Teammate’s Changes Without Push ‘n Pull-ing To Your Repo In PhpStorm., viewed ,<https://www.scien.cx/2021/12/01/cherry-pick-your-teammates-changes-without-push-n-pull-ing-to-your-repo-in-phpstorm/>
VANCOUVER
Sunny | Sciencx - » Cherry-Pick Your Teammate’s Changes Without Push ‘n Pull-ing To Your Repo In PhpStorm. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/12/01/cherry-pick-your-teammates-changes-without-push-n-pull-ing-to-your-repo-in-phpstorm/
CHICAGO
" » Cherry-Pick Your Teammate’s Changes Without Push ‘n Pull-ing To Your Repo In PhpStorm." Sunny | Sciencx - Accessed . https://www.scien.cx/2021/12/01/cherry-pick-your-teammates-changes-without-push-n-pull-ing-to-your-repo-in-phpstorm/
IEEE
" » Cherry-Pick Your Teammate’s Changes Without Push ‘n Pull-ing To Your Repo In PhpStorm." Sunny | Sciencx [Online]. Available: https://www.scien.cx/2021/12/01/cherry-pick-your-teammates-changes-without-push-n-pull-ing-to-your-repo-in-phpstorm/. [Accessed: ]
rf:citation
» Cherry-Pick Your Teammate’s Changes Without Push ‘n Pull-ing To Your Repo In PhpStorm | Sunny | Sciencx | https://www.scien.cx/2021/12/01/cherry-pick-your-teammates-changes-without-push-n-pull-ing-to-your-repo-in-phpstorm/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.