(Reuters) - Clothing retailer Gap Inc (>> Gap Inc) reported better-than-expected second-quarter results and raised its full-year profit forecast, helped by strong demand for Old Navy products, fewer discounts and better managing inventory.

The company's shares rose nearly 6 percent in trading after the bell on Thursday.

Gap's same-store sales increased 1 percent in the three months ended July 29, rising for the third straight quarter. Analysts were expecting sales to be flat year-over-year, according to research firm Consensus Metrix.

The results mirror a trend among U.S. retailers: department stores such as Macy's Inc (>> Macy's Inc) and J.C. Penney Co Inc (>> J C Penney Company Inc) have struggled, while apparel retailers like Ralph Lauren Corp (>> Ralph Lauren Corp) and Urban Outfitters (>> Urban Outfitters, Inc.) have benefited as they better managed inventory and gave fewer discounts.

Since becoming Gap's chief executive in 2015, Art Peck has reinvigorated the Old Navy brand, its biggest revenue contributor, through celebrity tie-ups, social media campaigns and better styles – dresses, pants, mid-tops and shorts did well in the latest quarter.

Same-store sales at Old Navy rose 5 percent, beating analysts' estimate of 3.1 percent. Old Navy's sales have now risen in seven of the past ten quarters, a bright spot for the company as its Gap and Banana Republic brands struggle.

Peck has also focused on Gap's supply chain, taking a leaf out of the book of fast-fashion retailers such as Zara and H&M, by reducing the time taken to bring latest fashion from the ramp to stores.

Peck on Thursday held up the swift turnaround time at Athleta, its active wear brand, as an example of initiatives that have driven double-digit growth in the brand this year.

"Athleta now has more than half of its bottoms business on responsive. And by responsive, I mean back in the styles in 8 weeks or less," Peck said in a post-earnings call.

The Gap brand recorded its smallest drop in same-store sales the past 10 quarters, but Banana Republic's sales fell more than expected.

The company's total revenue fell 1.4 percent to $3.799 billion, edging past analysts' estimate of $3.77 billion, according to Thomson Reuters I/B/E/S.

Gap's net income more than doubled to $271 million, helped by an insurance-related gain and year-ago restructuring costs.

Excluding the insurance-related gain, Gap's profit of 58 cents per share easily beat analysts' estimate of 52 cents.

Gap raised its adjusted profit forecast for fiscal 2017 to $2.02 to $2.10 per share from $1.95 to $2.05.

(Reporting by Gayathree Ganesan in Bengaluru; Editing by Savio D'Souza)

By Gayathree Ganesan