git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Adding a new file to all git branches

From
ABAneesh Bhasin <contact.aneesh@gmail.com>
Date
Mar 24, 2009, 03:41 UTC
Message-ID
<f662f0210903232041p6f86b882of7b2d708946ea905@mail.gmail.com>
Hi,

I was wondering if it is possible to add a file to all the branches in a repository without individually checking out each branch ?

A possible use-case for such a scenario is say I have a git repository with various branches related to different features, versions or bug-fixes and I want to be able to add a README file which contains instructions/information common to all of those branches as of now (but may diverge in future). So, do I have to checkout each branch individually to add the same README file to all of them or is there a direct/indirect workaround ?

Thanks for your help..

Regards, Aneesh

Next: Jeff King
Message 1 of 2 in “Adding a new file to all git branches”
  1. Aneesh BhasinMar 24, 2009
  2. Jeff KingMar 24, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.