Even if I strongly encourage you to record your electric guitars with any of the "traditional"ways I've mentioned in the previous articles, I must admit that direct recording the performance of a musician is by no means a bad idea. And it's pretty easy! You could, for instance, use a DI box to duplicate the signal of the instrument and send a copy to a preamp of your soundcard and another copy to your amp. A second option would be to use an ABY pedal like this one, or this one, to go into an instrument input of your audio interface and your guitar amp, obviously.
Just one final remark before moving on. To enjoy the greatest freedom when using such direct recordings, it's crucial that you observe as strictly as you can the advice given in the article dedicated to achieving optimum levels to get a recorded signal that is as faithful as possible to the original.
That's all very nice, but what's the use, you ask? To be honest, there's no single answer to this question...
The first advantage of this technique is relatively simple to understand: direct recording a take, while you're miking the amp at the same time, is like having a comfortable safety net to fall back on if need be! In fact, if the musical performance is exactly what you were expecting but the amp recordings aren't that convincing, you could always re-record that same take to set things right using the reamping technique.
The second advantage has to do with the creative possibilities a direct recording provides. As you probably know, it's not that easy for a guitarist to tweak his/her effects when playing. And yet, it would be fantastic to be able to vary the sound textures throughout the song. So, reamping the direct recording with all the freedom to tweak anything you want might prove to be the ideal solution. A famous example of this type of usage can be heard on the famous Paranoid Android track by Radiohead. To play the outro solo, guitarist Jonny Greenwood first recorded his performance and then fed it twice into the legendary Mutronics Mutator rack while playing with the settings. It was certainly worth it, wasn't it?
The last advantage is that direct recordings allow you to play with virtual amp plug-ins. I know some people might want to kill me for what I just wrote, because nothing can ever come close to a true guitar amp! And yet, you'd be surprised to learn that such plug-ins have been used much more often than you'd think in big productions lately. Besides, you must also admit that the quality of these products has evolved quite a bit in recent years, to the point that, in my humble opinion, it's completely impossible to tell the difference between them and a "true" amp. Finally, never forget that the weakest link in a home studio are usually room acoustics. And virtual amps allow you to completely forget about that issue. So, why not embrace this option when it offers so many advantages?