Generally, you may give away appreciated stock with a low tax basis and keep other stock with a high tax basis. It all depends on the tricky tax rules for charitable gifts of property. if you donate appreciated stock that would have produced a long-term capital gain if you had sold it i.e., you have owned the stock for more than 1 year, you can deduct the full fair market value of the stock on the date of the contribution.
However, if the stock gain would have been taxed at ordinary income rates had it been sold, your charitable deduction is limited to your basis in the stock. forExample , say,You acquired stock five years ago for $2k that is now worth $10k. If you donate the stock to charity, you can deduct an amount equal to the FMV, or $10k. There is no tax due on the $8k of appreciation.
If you have a choice between donating low-basis stock held more than 1 year and high-basis stock, it makes sense to donate the low-basis stock, absent any extenuating circumstances. Note that the tax advantages of donating low-basis stock will be accentuated if tax rates increase next year as expected.