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

Re: merging bare repository

From
Ggaryc618 <gary.carter@eigen.com>
Date
May 31, 2011, 02:01 UTC
Message-ID
<1306807292356-6421097.post@n2.nabble.com>
In-Reply-To
<20110513135348.GB10857@jpl.local>
Magnus Bäck-2 wrote:
Show 30 quoted lines
> 
> 
> Don't do the merge in the server-side bare git, do it somewhere you've
> made a non-bare clone that has a worktree. A workstation would be the
> best choice, but you could make such a clone on the server too (but I'd
> avoid introducing a process in an organization that required people to
> be able to logon to the Git server). Once you've actually done the merge
> you can push the merge commit to the master branch of
> ssh://git@server/git/project.git.
> 
> To deal with upstreams like this I recommend you place the upstream
> branch(es) in a separate namespace prefixed by <upstreamname>/, e.g.
> github/master if your upstream is the master branch from the official
> Github repo of the project. Example:
> 
>    git fetch ssh://git@some.org/git/project.git
>    git push ssh://git@server/git/project.git FETCH_HEAD:github/master
> 
> If you mirror the upstream branches like this on your server merges
> from upstream becomes trivial[*],
> 
>    git merge origin/github/master
>    git push ssh://git@server/git/project.git HEAD:master
> 
> and can be done on any workstation plus it's easy for your users to
> e.g. see what they've been up to compared to the upstream:
> 
>    git log origin/github/master..origin/master
> [...]
> 

Could you explain more about how this works - where do I find the character string to use instead of "github". It can't be arbitrary, I got an error message. When I did the fetch it said *branch HEAD -> FETCH_HEAD could you explain what this means in more detail?

We enthusiasts-who-don't-have-time-to-become-git-masters really need some well explained examples if we're going to be able to convince management that git is not some super complicated tool that takes weeks to learn. The particular use case described in this thread is the last sticking point I have to make work before I can show git doing everything we need it to do to my management.

-- View this message in context: http://git.661346.n2.nabble.com/merging-bare-repository-tp6358945p6421097.html Sent from the git mailing list archive at Nabble.com.

Previous: Enrico WeigeltNext: Magnus Bäck
Message 4 of 6 in “merging bare repository”
  1. Ilya BasinMay 13, 2011
  2. Magnus BäckMay 13, 2011
  3. Enrico WeigeltMay 13, 2011
  4. garyc618May 31, 2011
  5. Magnus BäckJun 6, 2011
  6. Jeff KingMay 13, 2011

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.