Two Useful Things

 @slamflipstrom

git cherry pick

Thing 1

Move commits from one branch to another without merge or rebase

48b9ce0
master
feature
git checkout feature

git cherry pick 48b9ce0
48b9ce0

conditional object properties with spread

Thing 2

Conditionally apply properties to an object

const user = {
    name: "Sam",
   ...(updatedAge && {age: values.age})
}
const user = {
    name: "Sam",
   ...(newValues.ssn !== props.user.ssn && {ssn: "000-00-0000"})
}

Git Cherry Pick

By slamflipstrom

Git Cherry Pick

  • 712