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

Branch Management

From
Mmail.chris.az@gmail.com <mail.chris.az@gmail.com>
Date
Aug 10, 2021, 22:24 UTC
Message-ID
<01d001d78e36$8d47f380$a7d7da80$@gmail.com>

I have a private git repository (private.git) on a private server (PRIVATEREPO.COM). That repo is updated via development on my local system. All works great in that area. I have 2 branches, "master" and "version".

I want to update my production system via git from the private git repository via command line. The production system not only contains the files from the repo, but also additional files and directories. I need those files to be left alone.

I was able to successful clone just the "master" branch using:
# git clone -b master git_user@PRIVATEREPO.COM:private.git production.git
I am now ready to move the new "version" branch.  
1.  How can I do that?

The "version" branch contains some new files that are not in the "master" branch.

Now suppose that I move to the "version" branch, but determine that I need to go back to the "master" branch.

2.  How do I go back to the "master" branch and remove any of the new files
that were uploaded from the "version" branch?  I don't want any remnants
that the "version" branch was even there.
Hopefully someone can head me in the right direction.
Thanks!
Next: Bagas Sanjaya
Message 1 of 2 in “Branch Management”
  1. mail.chris.az@gmail.comAug 10, 2021
  2. Bagas SanjayaAug 11, 2021

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.