If you love Me, you will keep My commandments. - John 14:15
Too often this is not only mistaken as a command but it's preached as such by many influential teachers. I believe this is largely due to presuppositions brought into their reading of scripture. Legalists particularly default to this being a command, completely mistaken that it's not a command but rather an evidentiary statement. In other words, Jesus is saying that the keeping of His commands is evidence of your love for Him. He is not trying to manipulate you like perhaps a family member would when they say "If you love me, you'll let me have the last brownie" (John 14:21), nor is He asking you to show what's is in your heart as He already knows (John 2:24). He's simply stating that one thing will give evidence of the other, much like James said about faith (Jam. 2:18). John would also write similar things in 1 John in order to reassure Christ's followers that the love they had for each other and for God was evidence of His Spirit in them, "for love is from God, and everyone who loves has been born of God and knows God" - 1 John 4:7b (see also, 1 John 3:18-19, 5:1-3). The lack thereof was also evidence of not knowing God: "the one who does not love does not know God, because God is love" - 1 John 4:8. Love is the evidence of (or lack thereof) fellowship with God, not a command in order to make it happen.
Further proof is given of this being evidentiary as just 6 verses later, in this same upper room discourse, Jesus reiterates "The one who has My commandments and keeps them is the one who loves Me". In other words, you can tell who love's Jesus because of their keeping of His commandments. To say this is somehow a command is to twist it into a work rather than being evidence of. If this were a work, in other words, if you needed to show God you love Him by keeping His commandments, or if keeping His commandments resulting in a love for Him, than the Pharisees must have been head over heals in love with God for nobody followed commandments better than they (Mat. 5:20). Yet Jesus said of them "This people honors Me with their lips, but their heart is far away from Me." - Matthew 15:8. If we do the acts of love toward God without actual love in our heart, then the same can be said about us.
The Pharisees may have had a lot of the right actions but they had all the wrong motives. They were not lovers of God, they were lovers of self (Mat. 23:25). Because of this, though on the outside they did a lot of right things, Jesus said they were "whitewash tombs" who inwardly were "full of dead men's bones and all uncleanness" (Mat. 23:27). Jesus then instructed them to first clean the inside of the cup and dish so the outside would become clean also. In the same way, one who loves God, in other words, one whom the Spirit has poured into them the love of God (Rom. 5:5) will bear His fruit of love and springing up from the inside will be love's attributes (Gal. 5:22-23, 1 Cor. 13:4-8) testifying of His presence. It's basic cause and effect. Christ said out of the abundance of the heart the mouth speaks (Mat. 12:34) and similarly "the good person out of the good treasure of his heart brings forth what is good" (Luke 6:45a). The cause then is that which fills the heart (Luke 6:45), the effect is the treasure that comes from it. The Pharisees were constantly trying to showing loving effects, but without love in their hearts, therefore they did terrible at it for their cause was all wrong; their cause was for their own purposes. If we try and obey God's commands for any reason other than out of love in our heart (Psa. 40:8), we'll not only fail miserably as the hypocritical Pharisees did, but like them, we'll twist all of them to suit whatever other reason is in our heart.
One who loves God and loves His neighbor will instinctively follow the commandments of God because all of the rules God gave were entirely on the basis of love (Gal. 5:14). Jesus said, "You shall love the Lord your God with all your heart, and with all your soul, and with all your mind.’ This is the great and foremost commandment. The second is like it, ‘You shall love your neighbor as yourself.’ Upon these two commandments hang the whole Law and the Prophets.” - Matthew 22:37-40. Therefore, if you love God and love your neighbor, you will keep the commandments and instructions of the prophets because that's the effect of love! For example, if you love someone you WILL (not shall) act according to 1 Corinthians 13:4-8 toward them. So when Paul writes "Love does not seek its own benefit" (v5) then one who loves his neighbor looks out for the neighbors benefit over their own. It's not a command to do the work, it's evidence of the love for them in their heart.
The commandments of God were never going to bring about any righteousness, they didn't in Moses day, and they won't in our day (Rom. 8:3, Gal. 3:19). The law of Moses wasn't given to bring about righteousness in a person (Gal. 3:21) but rather to show them the lack thereof and bring light to the presence of sin and point them to their need for a Savior (Rom. 7:13, Gal. 3:24). The law was our tutor to bring us to Christ, that we might be justified by faith." - Galatians 3:24.
Commands from God are evident as they usually proceeding with something like "you shall", or "remember to", not phrases like "if you" which could be seen as optional or voluntary. God's commands were never optional but were required of every human without missing one of them (Gal. 3:10, Jam. 2:10) with the intent of making sin known (Rom. 7:13). God knew we had it, but until the law came, we didn't (Rom. 5:14, 7:7).
Whether it's Old Testament Mosaic laws or New Testament seemingly perceived "commands", regardless it comes down to this. We can't do them, only God can (Mat. 5:17, Rom. 3:31), therefore it's foolish to think we can, or even that we can help as nothing good dwells within our flesh (Rom. 7:18). On the contrary, if we have the Spirit then we need not worry "for it is God who is at work in you, both to desire and to work for His good pleasure." - Philippians 2:13. It's only those who lack faith in the Spirit to accomplish what that verse says who concern themselves with "getting busy" trying to keep commands. One who has faith trusts they're justified (Rom. 4:5) regardless if they eat meat or not, or observes the sabbath or not (Rom. 14:1,5). One who is weak in faith concerns themselves with trying to help the Spirit along in their own strength (Col. 2:20-23, Rom. 14:1) trying to be perfected in the flesh (Gal. 3:3).
The fact is, with Christ we can do all things (Phil. 4:13) but without Him we can do nothing (John 15:5). Our focus shouldn't be on keeping the commands, but let the commands have their purpose and point us to Christ (Gal. 3:24). Once there, our eyes shouldn't be on what we are doing or not doing, but they should be fixed on Jesus (Heb. 12:2) resting in what He's done (John 19:30) and trusting in what He's doing (1 Thes. 5:23, Phil. 1:6). And while Christ warned that a branch cannot bear fruit of itself, He likewise promised that the one who abides in Him "bears much fruit!" (John 15:5). He doesn't qualify it with "might" or "could", but simply those that abide will bear much fruit. So therefore let us not worry about what is happening outwardly like the Pharisees who kept washing the outside of the cup and dish, or even Martha who was distracted with all her preparations (Luke 10:40), but, like Mary, let's do the one thing that is necessary and rest in our refuge Jesus Christ (Luke 10:42, Mat. 11:28-30), trusting in His promises to work in us His fruit (Gal. 5:22-23), Who gives us both the desire and the ability to work for Him (Phil. 2:13), and accomplish the works He already prepared beforehand (Eph. 2:10).