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

"True" git merge in git-pasky

From
Petr Baudis <pasky@ucw.cz>
Date
Apr 19, 2005, 03:51 UTC
Message-ID
<20050419035107.GB5554@pasky.ji.cz>
  Hello,
  so I've implemented "true" git merge in git-pasky, using core git's
merging capabilities. It seems to even work. :-)
  I tested it briefly, and even did one non-conflicting and one
conflicting merge with Linus with this, but I'd like to hear your
comments and possibly more testing before releasing it.
  To get the lastest git-pasky, get the tarball at
	http://pasky.or.cz/~pasky/dev/git
unpack, build, install, do
	git pull
rebuild and reinstall.
  The semantics is trivial (and it might get changed so that you would
do git update instead of git pull at most of places). If you don't have
a given GIT repository ready yet, do
	git init rsync://example.com/repo
in a new directory. It is by default tracking, therefore if you do
	git pull

anytime later, git merge will be automatically invoked. If you want to prevent this, do

	git track

which will untrack your tree; the remote branch you were tracking is called "origin", shall you want to pull/merge it later. You might want to also merge with someone else. Do

	git addremote elsewhere rsync://example.org/another
	git pull elsewhere
	git merge elsewhere

(Note that merge won't pull automatically; you must do that on your own if you want to pull.)

If the merge didn't succeed and you have conflicts, don't panic. The merge told you about the conflicts, you can also do

	git diff

to see the changes, you'll probably spot the conflict markers. Resolve the conflicts and then simply do

	git commit
to commit the pending merge.

Now you decided to do a little bit of parallel development and stick your patches not ready for 2.6.12 to a separate tree. That's fine, do

	git fork experimental ~/linux-2.6.experimental

and get some coffee. (It takes about 8 minutes here, but I think git isn't at fault - it is probably all spent in

	read-tree $(tree-id)
	checkout-cache -a
	update-cache --refresh
and you pretty much need to call that.)
Then, do some work there, syncing with your main tree periodically:
	git merge master

(that's how your first init'd branch is called). You decide to make it more fun for Linus and push your experimental stuff into your master tree. Fine, cd there and do

	git merge experimental
and there you go!
Have fun,
-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor
Next: bert hubert
Message 1 of 10 in “"True" git merge in git-pasky”
  1. Petr BaudisApr 19, 2005
  2. bert hubertApr 19, 2005
  3. Petr BaudisApr 19, 2005
  4. Francois RomieuApr 19, 2005
  5. [RFC] Possible strategy cleanup for git add/remove/diff etc.Junio C Hamano, Apr 20, 2005
  6. Linus TorvaldsApr 20, 2005
  7. Junio C HamanoApr 20, 2005
  8. Linus TorvaldsApr 20, 2005
  9. Junio C HamanoApr 20, 2005
  10. Junio C HamanoApr 21, 2005

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.